Components: BrowserModule can't be used when using BrowserAnimationsModule

Created on 10 Apr 2017  路  6Comments  路  Source: angular/components

Proposal:

I think that in the getting started documentation, specifically step 2 we should see an indication like: 'When using BrowserAnimationsModule please, do not use BrowserModule, it can only be loaded once in your application, and BrowserAnimationModule has already imported it'.

Most helpful comment

This isn't something that's exactly under Material's umbrella. The issue is that BrowserAnimationModule imports BrowserModule without also exporting it; BrowserModule exports CommonModule which contains ngIf, ngFor, etc., so to fix your problem you can just import CommonModule from @angular/common.

Feel free to open an issue for this on https://github.com/angular/angular/

All 6 comments

This should be documented because I have been trying to get the new version of material to work only to have all sorts of import issues with the aminations and system.js

In the end I gave up and reverted to the previous version because it just wasnt working

I had similar issues today while updated from beta2 to beta3. An updated example plnkr/app would be nice to have

Yep, removing the BrowserModule worked for me. Thanks @JordyBaylac

Spoke too soon. Without the BrowserModule, some of my lazy-loaded components don't work as expected. *ngIf doesn't seem to be working...

This isn't something that's exactly under Material's umbrella. The issue is that BrowserAnimationModule imports BrowserModule without also exporting it; BrowserModule exports CommonModule which contains ngIf, ngFor, etc., so to fix your problem you can just import CommonModule from @angular/common.

Feel free to open an issue for this on https://github.com/angular/angular/

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vanor89 picture vanor89  路  3Comments

julianobrasil picture julianobrasil  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

michaelb-01 picture michaelb-01  路  3Comments

Miiekeee picture Miiekeee  路  3Comments