title: ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[UserRegistrationComponent -> FormBuilder]:
body: <p>when I click on the link <strong>routerLink="user/registration"</strong>:</p>
  
  <p>the form should appear <strong>src/app/user/user-registration.component.html</strong> but an error appears in the console:</p>
  
  <pre><code>ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[UserRegistrationComponent -&gt; FormBuilder]: 
    StaticInjectorError(Platform: core)[UserRegistrationComponent -&gt; FormBuilder]: 
      NullInjectorError: No provider for FormBuilder!
  Error: StaticInjectorError(AppModule)[UserRegistrationComponent -&gt; FormBuilder]: 
    StaticInjectorError(Platform: core)[UserRegistrationComponent -&gt; FormBuilder]: 
      NullInjectorError: No provider for FormBuilder!
      at _NullInjector.get (core.js:1002)
      at resolveToken (core.js:1300)
      at tryResolveToken (core.js:1242)
      at StaticInjector.get (core.js:1110)
      at resolveToken (core.js:1300)
      at tryResolveToken (core.js:1242)
      at StaticInjector.get (core.js:1110)
      at resolveNgModuleDep (core.js:10854)
      at NgModuleRef_.get (core.js:12087)
      at resolveDep (core.js:12577)
      at _NullInjector.get (core.js:1002)
      at resolveToken (core.js:1300)
      at tryResolveToken (core.js:1242)
      at StaticInjector.get (core.js:1110)
      at resolveToken (core.js:1300)
      at tryResolveToken (core.js:1242)
      at StaticInjector.get (core.js:1110)
      at resolveNgModuleDep (core.js:10854)
      at NgModuleRef_.get (core.js:12087)
      at resolveDep (core.js:12577)
      at resolvePromise (zone.js:809)
      at resolvePromise (zone.js:775)
      at eval (zone.js:858)
      at ZoneDelegate.invokeTask (zone.js:421)
      at Object.onInvokeTask (core.js:4740)
      at ZoneDelegate.invokeTask (zone.js:420)
      at Zone.runTask (zone.js:188)
      at drainMicroTaskQueue (zone.js:595)
      at ZoneTask.invokeTask [as invoke] (zone.js:500)
      at invokeTask (zone.js:1517)
  </code></pre>
  
  <p>The link is placed in the component <strong>src/app/core/menu/menu.component.html</strong></p>
  
  <pre><code>&lt;ul&gt;         
      &lt;li&gt;
          &lt;a class="nav-link" routerLink="user/registration"&gt;Rejestracja&lt;/a&gt;
      &lt;/li&gt;         
  &lt;/ul&gt;
  </code></pre>
  
  <p>The core module contains <strong>src/app/core/core.module.html</strong>:</p>
  
  <pre><code>@NgModule({
    imports: [
      CommonModule,
      RouterModule
    ],
    declarations: [MenuComponent],
    exports: [MenuComponent ]
  })
  export class CoreModule { }
  </code></pre>
  
  <p><strong>src/user/user.module.ts</strong> contains the code:</p>
  
  <pre><code>const routes = [
    {
      path: 'user/registration',
      component: UserRegistrationComponent
    }
  ];
  
  @NgModule({
    imports: [
      CommonModule,
      FormsModule,
      RouterModule.forChild(routes)
    ],
    declarations: [
      UserRegistrationComponent
    ],
    exports: [UserRegistrationComponent, FormsModule]
  })
  export class UserModule { }
  </code></pre>
  
  <p><strong>app.module.ts</strong> contains the code:</p>
  
  <pre><code>const routes: Routes = [
   {
      path: '',
      component: MenuComponent
    }
  ];
  
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      FormsModule,
      CoreModule,
      UserModule,
      RouterModule.forRoot(routes)
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>I don't know what the error caused is. </p>