小编Gau*_*hee的帖子

从 Angular 2 升级到 Angular 4.4 时出现 Angular 路由器问题

我已按照官方migating_documentation中提到的相同步骤进行操作我遵循了Angular

不幸的是,当我将代码从 Angular 2 迁移到 Angular 4.4 时,我遇到了一个问题。该问题可能与@angular/router有关。

然而,代码似乎工作正常,但我无法进行构建。任何建议将不胜感激。

终端中显示错误:

ERROR in [at-loader] src/app/app.component.ts:60:16 
TS2339: Property 'url' does not exist on type 'Event'.
Property 'url' does not exist on type 'RouteConfigLoadStart'

ERROR in [at-loader] src/app/app.component.ts:60:39 
TS2339: Property 'url' does not exist on type 'Event'.
Property 'url' does not exist on type 'RouteConfigLoadStart'.

ERROR in [at-loader] src/app/app.component.ts:60:68 
TS2339: Property 'url' does not exist on type 'Event'.
Property 'url' does not exist on type 'RouteConfigLoadStart'.
Run Code Online (Sandbox Code Playgroud)

包.json

ERROR in [at-loader] src/app/app.component.ts:60:16 …
Run Code Online (Sandbox Code Playgroud)

javascript typescript angular2-routing angular angular4-router

6
推荐指数
1
解决办法
2715
查看次数