I\'ve got the following error when launching my Angular app, even if the component is not displayed.
I have to comment out the so that my
Throwing in this might help someone.
Assuming you have created a new NgModule, say AuthModule dedicated to handling your Auth needs, make sure to import FormsModule in that AuthModule too.
If you'll be using the FormsModule ONLY in the AuthModule then you wouldn't need to import the FormModule IN the default AppModule
So something like this in the AuthModule:
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { authRouting } from './auth.routing';
import { LoginComponent, SignupComponent } from './auth.component';
@NgModule({
imports: [
authRouting,
FormsModule
],
declarations: [
SignupComponent,
LoginComponent
]
})
export class AuthModule { }
Then forget about importing in AppModule if you don't use the FormsModule anywhere else.