component index
ng g component product-list
ng g component product-detail
ng g component user-center
定义...[
BrowserModule,
AppRoutingModule,
FormsModule,
HttpClientModule,
RouterModule.forRoot...重定向到另一个路由地址)
{path:'', redirectTo: 'index',pathMatch:'full'},
//重定向需要指定“路由地址匹配方式”为“完全匹配”
路由词典中可以指定一个匹配任一地址的地址...[
BrowserModule,
AppRoutingModule,
FormsModule,
HttpClientModule,
RouterModule.forRoot...,Angular 会根据当前的路由器状态动态填充它。