No provider for Router?

后端 未结 8 971
情书的邮戳
情书的邮戳 2020-12-01 08:57

Im getting this error:

EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0 caused by: No provider for Router!

8条回答
  •  再見小時候
    2020-12-01 09:42

    Please use this module

    RouterModule.forRoot(
      [
        { path: "", component: LoginComponent}
      ]
    )
    

    now just replace your with thats it

提交回复
热议问题