angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Intermittent Issue - Cannot reuse an outlet that does not contain a component #378

Closed sirajc closed 8 years ago

sirajc commented 8 years ago

In Application with parent-child routing and router-outlets, I am getting this error intermittenly, Most the time route change works, but sometimes it logs following error in console

EXCEPTION: Cannot reuse an outlet that does not contain a component.
angular2.dev.js:21984 EXCEPTION: Cannot reuse an outlet that does not contain a component.BrowserDomAdapter.logError @ angular2.dev.js:21984
angular2.dev.js:21984 STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:21984
angular2.dev.js:21984 Error: Cannot reuse an outlet that does not contain a component.
    at new BaseException (angular2.dev.js:16109)
    at RouterOutlet.reuse (router.dev.js:2260)
    at ChildRouter.Router.commit (router.dev.js:1983)
    at router.dev.js:1992
    at Zone.run (angular2.dev.js:138)
    at Zone.run (angular2.dev.js:10669)
    at zoneBoundFn (angular2.dev.js:111)
    at lib$es6$promise$$internal$$tryCatch (angular2.dev.js:1507)
    at lib$es6$promise$$internal$$invokeCallback (angular2.dev.js:1519)
    at lib$es6$promise$$internal$$publish (angular2.dev.js:1490)

Details of nested routing is available https://github.com/sirajc/angular2-comp-with-router, Will provide a link to app for quick debug

sonicoder86 commented 8 years ago

I have the same issue when redirecting the user inside RouterOutlet in the activate method. It redirects nicely, but when i hit the back button it throws this error.

ArniDzhan commented 8 years ago

@blacksonic this project is not being supported at the moment, here is updated version of new router with examples. https://github.com/petebacondarwin/ng1-component-router-demo

sirajc commented 8 years ago

This has been closed by https://github.com/angular/angular/issues/4228