ui-router / sample-app-angular-hybrid

UI-Router Hybrid Sample App: Route to Angular 1 and Angular 2 components
https://ui-router.github.io/sample-app-angular-hybrid
100 stars 63 forks source link

Angular Hybrid App fails #523

Open Js4Life opened 4 years ago

Js4Life commented 4 years ago

ERROR NullInjectorError: StaticInjectorError(AppModule)[UISref -> UIRouter]: StaticInjectorError(Platform: core)[UISref -> UIRouter]: NullInjectorError: No provider for UIRouter! at NullInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:36417:27) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveNgModuleDep (https://localhost:3000/cmep/lib/vendor-es2015.js:62298:29) at NgModuleRef_.get (https://localhost:3000/cmep/lib/vendor-es2015.js:63364:16) at resolveDep (https://localhost:3000/cmep/lib/vendor-es2015.js:63895:45) View_AppComponent0 @ AppComponent.html:2 proxyClass @ compiler.js:19671 logError @ core.js:45546 handleError @ core.js:6066 (anonymous) @ core.js:40731 invoke @ zone-evergreen.js:359 run @ zone-evergreen.js:124 runOutsideAngular @ core.js:39572 (anonymous) @ core.js:40728 invoke @ zone-evergreen.js:359 onInvoke @ core.js:39699 invoke @ zone-evergreen.js:358 run @ zone-evergreen.js:124 (anonymous) @ zone-evergreen.js:855 invokeTask @ zone-evergreen.js:391 onInvokeTask @ core.js:39680 invokeTask @ zone-evergreen.js:390 runTask @ zone-evergreen.js:168 drainMicroTaskQueue @ zone-evergreen.js:559 invokeTask @ zone-evergreen.js:469 invokeTask @ zone-evergreen.js:1603 globalZoneAwareCallback @ zone-evergreen.js:1640 AppComponent.html:2 ERROR CONTEXT DebugContext {view: {…}, nodeIndex: 4, nodeDef: {…}, elDef: {…}, elView: {…}} View_AppComponent0 @ AppComponent.html:2 proxyClass @ compiler.js:19671 logError @ core.js:45546 handleError @ core.js:6071 (anonymous) @ core.js:40731 invoke @ zone-evergreen.js:359 run @ zone-evergreen.js:124 runOutsideAngular @ core.js:39572 (anonymous) @ core.js:40728 invoke @ zone-evergreen.js:359 onInvoke @ core.js:39699 invoke @ zone-evergreen.js:358 run @ zone-evergreen.js:124 (anonymous) @ zone-evergreen.js:855 invokeTask @ zone-evergreen.js:391 onInvokeTask @ core.js:39680 invokeTask @ zone-evergreen.js:390 runTask @ zone-evergreen.js:168 drainMicroTaskQueue @ zone-evergreen.js:559 invokeTask @ zone-evergreen.js:469 invokeTask @ zone-evergreen.js:1603 globalZoneAwareCallback @ zone-evergreen.js:1640 zone-evergreen.js:651 Unhandled Promise rejection: StaticInjectorError(AppModule)[UISref -> UIRouter]: StaticInjectorError(Platform: core)[UISref -> UIRouter]: NullInjectorError: No provider for UIRouter! ; Zone: ; Task: Promise.then ; Value: NullInjectorError: StaticInjectorError(AppModule)[UISref -> UIRouter]: StaticInjectorError(Platform: core)[UISref -> UIRouter]: NullInjectorError: No provider for UIRouter! at NullInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:36417:27) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveNgModuleDep (https://localhost:3000/cmep/lib/vendor-es2015.js:62298:29) at NgModuleRef.get (https://localhost:3000/cmep/lib/vendor-es2015.js:63364:16) at resolveDep (https://localhost:3000/cmep/lib/vendor-es2015.js:63895:45) NullInjectorError: StaticInjectorError(AppModule)[UISref -> UIRouter]: StaticInjectorError(Platform: core)[UISref -> UIRouter]: NullInjectorError: No provider for UIRouter! at NullInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:36417:27) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51335:24) at tryResolveToken (https://localhost:3000/cmep/lib/vendor-es2015.js:51261:16) at StaticInjector.get (https://localhost:3000/cmep/lib/vendor-es2015.js:51111:20) at resolveNgModuleDep (https://localhost:3000/cmep/lib/vendor-es2015.js:62298:29) at NgModuleRef_.get (https://localhost:3000/cmep/lib/vendor-es2015.js:63364:16) at resolveDep (https://localhost:3000/cmep/lib/vendor-es2015.js:63895:45) api.onUnhandledError @ zone-evergreen.js:651 handleUnhandledRejection @ zone-evergreen.js:675 api.microtaskDrainDone @ zone-evergreen.js:668 drainMicroTaskQueue @ zone-evergreen.js:566 invokeTask @ zone-evergreen.js:469 invokeTask @ zone-evergreen.js:1603 globalZoneAwareCallback @ zone-evergreen.js:1640

ronyf commented 4 years ago

@Js4Life any solution?