将 Angular 升级到 5.0.1 版后,我找不到错误原因。也许有人有同样的问题。
"dependencies": {
__"@angular/animations": "~5.0.1",__
__"@angular/cdk": "^5.0.0-rc0",__
__"@angular/cli": "^1.5.0",__
__"@angular/common": "~5.0.1",__
__"@angular/compiler": "~5.0.1",__
__"@angular/core": "^5.0.1",__
__"@angular/forms": "~5.0.1",__
__"@angular/http": "~5.0.1",__
__"@angular/material": "^5.0.0-rc0",__
__"@angular/platform-browser": "~5.0.1",__
__"@angular/platform-browser-dynamic": "~5.0.1",__
__"@angular/router": "~5.0.1"__
}
"devDependencies": {
__"@angular/cli": "1.5.0",__
__"@angular/compiler-cli": "~5.0.1",__
__"@angular/language-service": "~5.0.1"__
}
const appRoutes: Routes = [
{
path: 'users',
loadChildren: './users/users.module#UsersModule'
}
];
export const appRouting: ModuleWithProviders = RouterModule.forRoot(appRoutes);
import { appRouting } from './app.routing';
@NgModule({
declarations: [AppComponent],
imports: [appRouting]
...
)};
...