Programmers learn & share
0 votes
38 views

Problem :

I have upgraded my Angular 4 project using angular-seed but now facing following error
please include either "browseranimationsmodule" or "noopanimationsmodule" in your application.
by (6.9k points)   | 38 views

1 Answer

0 votes

Solution :

I had also encounterd this error message recently and found that it is often misleading.

You must have forgotten to import the most important BrowserAnimationsModule. 

The problem was animating an*ngIf in the component template but I had forgotten to mention it in the @Component.animations for the component class.

@Component({
  selector: '...',
  templateUrl: './...',
  animations: [myNgIfAnimation] // <-- Please Don't forget it!
})

If you use an animation in a template then you should also list that animation in the component's animations metadata each and every time.

by (36.1k points)  
2,204 questions
2,608 answers
59 comments
241 users