maxime1992 / angular-ngrx-starter

An opiniated Angular setup based on @angular/cli to kickstart an ngrx project
https://maxime1992.github.io/angular-ngrx-starter/
65 stars 8 forks source link

BrowserAnimationsModule #4

Closed alastair-todd closed 6 years ago

alastair-todd commented 6 years ago

Hi

Could you please explain why BrowserAnimationsModuleended up in the core module and not the shared module?

I find it difficult to reason the difference between:

1) "a module you only want to import once" and 2) "a module to be shared with other feature modules"

I don't yet see why these are mutually exclusive.

Thanks

maxime1992 commented 6 years ago

Hi @alastair-todd!

Sure, BrowserAnimationsModuleended do not need to be shared. You only have to import it once to get it working for the whole app. For example into AppModule.

But as I do have a dedicated module for things I want to import once (CoreModule), this is where I've put it.

I know it can be confusing at the beginning between AppModule, SharedModule, FeatureModule and CoreModule.

Hope I'm clear enough, let me know otherwise

maxime1992 commented 6 years ago

I'm closing it for now, if you want more information feel free to comment or reopen :)