You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No provider for ChildrenOutletContexts (injectionError)
错误详情如下:
ERROR Error: No provider for ChildrenOutletContexts!
at injectionError (core.es5.js:1169)
at noProviderError (core.es5.js:1207)
at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._throwOrNull (core.es5.js:2649)
at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKeyDefault (core.es5.js:2688)
at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKey (core.es5.js:2620)
at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (core.es5.js:2489)
at resolveNgModuleDep (core.es5.js:9481)
at NgModuleRef_.webpackJsonp.../../../core/@angular/core.es5.js.NgModuleRef_.get (core.es5.js:10569)
at resolveDep (core.es5.js:11072)
at createClass (core.es5.js:10936)
改变
imports: [RouterModule.forChild(routes)],
为
imports: [RouterModule.forRoot(routes)],
原因
这是由于你在根模块里面使用了forChild, 应该使用forRoot:
The text was updated successfully, but these errors were encountered:
No provider for ChildrenOutletContexts (injectionError)
错误详情如下:
改变
为
原因
这是由于你在根模块里面使用了
forChild
, 应该使用forRoot
:The text was updated successfully, but these errors were encountered: