Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
145 views
in Technique[技术] by (71.8m points)

node.js - Navigation Error in angular2

I have updated the angular packages version from 2.4.10 to 4.0.0 after updating i am getting the following errors while navigating.

ERROR Error: Uncaught (in promise): Error: Found the synthetic property @transformPlaceholder. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.
Error: Found the synthetic property @transformPlaceholder. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application

And i changed the webpack.common.js configuration. see the below code

 new webpack.ContextReplacementPlugin(
            // The (\|/) piece accounts for path separators in *nix and Windows
            /angular(\|/)core(\|/)@angular/,
            helpers.root('./src'), // location of your src
            {} // a map of your routes
        ),
question from:https://stackoverflow.com/questions/42994337/navigation-error-in-angular2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have fixed the issue. I added a new package: @angular/animations.

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

And I imported the module:

@NgModule({
    imports: [
        BrowserAnimationsModule
    ]
})

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...