I am trying to use a component from an angular library and get the console 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.
Both the SharedModule from the library and the AppModule in the app have the imports
import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
The library is imported into the AppModule using
import { SharedModule as pdlSharedModule } from 'pdl';
If I remove the Browser imports from pdlSharedModule and try to use instead get the console error message
NullInjectorError: R3InjectorError(t)[y -> y -> y -> y]: when I try to access
If I remove the Browser imports from AppModule that gets the same NullInjectorError but on the first page.
I am just not sure of the correct way to import an angular library with angular-ngrx-material-starter. I am on angular cli version 12.2.6
I am trying to use a component from an angular library and get the console 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.
Both the SharedModule from the library and the AppModule in the app have the imports
import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
The library is imported into the AppModule using import { SharedModule as pdlSharedModule } from 'pdl';
If I remove the Browser imports from pdlSharedModule and try to use instead get the console error message NullInjectorError: R3InjectorError(t)[y -> y -> y -> y]: when I try to access
If I remove the Browser imports from AppModule that gets the same NullInjectorError but on the first page.
I am just not sure of the correct way to import an angular library with angular-ngrx-material-starter. I am on angular cli version 12.2.6