tommueller / ng-mat-search-bar

An Angular 2+ component for an expandable search-icon.
MIT License
37 stars 9 forks source link

Error when import in lazy loaded module in Angular 7 #4

Closed dodongphure closed 5 years ago

dodongphure commented 5 years ago

When I imported NgMatSearchBarModule in my lazy loaded module, it show error:

BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

Because in app.module.ts I already imported BrowserAnimationsModule, so I think should change the import in NgMatSearchBarModule, replace BrowserAnimationsModule with CommonModule.

tommueller commented 5 years ago

Thanks for reporting this issue! However I cannot reproduce it. Can you create a plunkr or stackblitz to demonstrate the issue? Cheers!

dodongphure commented 5 years ago

Hi @tommueller, here is the codes sample https://stackblitz.com/edit/angular-znywpe

Rehan1579 commented 5 years ago

Hi, i'm also facing the same issue....

denisenricohasyim93 commented 5 years ago

same here ...

tommueller commented 5 years ago

Sorry I have been on vacation this week. Thanks for the blitz @dodongphure, I will look into it this week!

tommueller commented 5 years ago

Hi, should be fixed in v3.1.0 release, refer to this edited stackblitz where it is working now: https://stackblitz.com/edit/angular-uhu9tw