gpt4 book ai didi

angular - 将 Angular 2 升级到 Angular 4 没有导出成员 'AnimationDriver'

转载 作者:太空狗 更新时间:2023-10-29 18:05:55 36 4
gpt4 key购买 nike

我已将 Angular 2 升级到 Angular 4。当我运行我的项目时,我遇到了以下错误。

node_modules/@angular/platform-browser/platform-browser"' has no exported member 'AnimationDriver'.

最佳答案

https://github.com/angular/angular/blob/master/CHANGELOG.md#400-rc1-2017-02-24

Animation Package

We have pulled Animations into their own package. This means that if you don’t use Animations, this extra code will not end up in your production bundles. This also allows you to more easily find documentation and to take better advantage of autocompletion. If you do need animations, libraries like Material will automatically import the module (once you install it via NPM), or you can add it yourself to your main NgModule.

npm install @angular/animations@latest --save
@angular/animations/browser
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

另见 Plunker

关于angular - 将 Angular 2 升级到 Angular 4 没有导出成员 'AnimationDriver',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43200519/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com