Since RegisterComponent
was declared in RegisterRouter
(what’s the name for module?) module then you have to import CommonModule
there:
@NgModule({
imports: [
RouterModule.forChild(routes),
FormsModule,
ReactiveFormsModule,
CommonModule <================== this line
],
declarations: [
RegisterComponent // this component wants to have access to built-in directives
],
exports: [RouterModule]
})
export class RegisterRouter { }