我有一些密码女巫停止工作..。我也不知道为什么。
HTML:
<a class="nav_link" [routerLink]="['RowList']">
<svg><use xlink:href="#icon-list"></use></svg>
Lista
</a>联署材料:
@RouteConfig([
{path: '/UI/row/list', component: RowList, name: 'RowList'}
])直到上星期五(29.01.2016),它的工作状态很好,现在在控制台上:
EXCEPTION: TypeError: zone.addTask is not a function我的项目中有ZoneJS。
编辑
堆栈跟踪:
TypeError: zone.addTask不是区域上的函数。(匿名函数) (http://localhost:8081/prod/scripts.gz.js:11297:28)在Zone.setTimeout (http://localhost:8081/prod/scripts.gz.js:26201:27)在窗口。(匿名函数) (http://localhost:8081/prod/scripts.gz.js:11263:47)在SafeSubscriber。(http://localhost:8081/prod/scripts.gz.js:23249:63)在SafeSubscriber.tryCatcher next at SafeSubscriber.next (http://localhost:8081/prod/scripts.gz.js:23852:19) at EventEmitter.Subject._finalNext (http://localhost:8081/prod/scripts.gz.js:23450:31) at EventEmitter.Subject._next (http://localhost:8081/prod/scripts.gz.js:23442:19) at EventEmitter.Subject.next (http://localhost:8081/prod/scripts.gz.js:23405:15) at EventEmitter.emit (http://localhost:8081/prod/scripts.gz.js:23239:77) Router._afterPromiseFinishNavigating (http://localhost:8081/prod/scripts.gz.js:42623:40) at http://localhost:8081/prod/scripts.gz.js:42558:27 )在Injector._instantiateProvider (http://localhost:8081/prod/scripts.gz.js:13996:26) Injector._instantiateProvider (http://localhost:8081/prod/scripts.gz.js:13996:26) at Injector._new (http://localhost:8081/prod/scripts.gz.js:13985:22) -异步间隙- _getStacktraceWithUncaughtError (http://localhost:8081/prod/scripts.gz.js:11857:30) at Zone.fork (http://localhost:8081/prod/scripts.gz.js:11906:48) at NgZone.createInnerZone (http://localhost:8081/prod/scripts.gz.js:26128:15) at new NgZone (http://localhost:8081/prod/scripts.gz.js:25914:37) at createNgZone (http://localhost:8081/prod/scripts.gz.js:25428:13) at PlatformRef.application (http://localhost:8081/prod/scripts.gz.js:25529:34) at Object.bootstrap (http://localhost:8081/prod/scripts.gz.js:12022:65) at HTMLDocument.main (http://localhost:8081/prod/scripts.gz.js:56780:23) at HTMLDocument.main(http://localhost:8081/prod/scripts.gz.js:56780:23) at Zone.run (http://localhost:8081/prod/scripts.gz.js:56780:23) at Zone.run(code>C55)
发布于 2016-02-03 13:38:51
我查看了zone.js依赖项(版本0.5.10),在Zone对象中看不到任何addTask方法(参见文件node_modules/zone.js/lib/zones/core.js)。
在您的角度应用程序中是否通过NgZone显式地使用区域?
编辑
在Angular2中,ZoneJ是在node_modules/angular2/bundles/angular2-polyfills.js文件中提供的。
蒂埃里
https://stackoverflow.com/questions/35178320
复制相似问题