[转] 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

],

--------------------- 本文来自 yaerfeng 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/yaerfeng/article/details/68956298?utm_source=copy