can not find module @angular/animations/browser

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yaerfeng/article/details/68956298

angularjs4升级了,原来的animations现在被单独出来一个包。

package.json中添加

"dependencies": {
         "@angular/animations""^4.0.1",
}

npm install

在相应的模块或者app.module.ts中添加

import {  BrowserAnimationsModule }  from  '@angular/platform-browser/animations';
imports: [
         BrowserAnimationsModule
    ],

猜你喜欢

转载自blog.csdn.net/yaerfeng/article/details/68956298