-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primary outlet is already registered. #58
Comments
Did you try cloning the latest? Just updated to beta.9 :) |
This is a common problem if you are trying to use the minified version of the router library. Try switching to the non-minified version and the problem should go away. |
@chenkie: After update angular to beta 9, this error occurred |
I ported the custom router outlet over to my own code and an upgrade to beta 9 triggered the same issue. Here's the relevant Angular 2 commit. |
@dieuhd - have you also updated the other libraries including rxjs and zone (as well as devDependencies). I had that issue arise during the bump to beta 9 - but after updating all dependencies to what you see in the latest commit and using the non-minified version of the router the error went away. Is there a code sample you can share? |
@kukicadnan Here are my code:
|
Not to hijack this thread, but as an alternative, you can also apply a |
i got it working (using beta-11) by renaming the selector from router-outlet to auth-router-outlet |
@ric-cardo Working with beta-9 too. Downgraded to beta-9 because of breaking changes. |
In addition to using the non-minified router, I had to use the non-minified version of Angular 2 as well, e.g. |
I still get this |
I managed to get it to work by using this filter in app.component and other components with internal routing:
|
When i update angular to beta9, i got an error:
ORIGINAL EXCEPTION: Primary outlet is already registered.BrowserDomAdapter.logError @ angular2.dev.js:23597ExceptionHandler.call @ angular2.dev.js:1269(anonymous function) @ angular2.dev.js:12576NgZone._notifyOnError @ angular2.dev.js:13620collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:13524Zone.run @ angular2-polyfills.js:1247(anonymous function) @ angular2.dev.js:13543zoneBoundFn @ angular2-polyfills.js:1220lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:468lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:480lib$es6$promise$$internal$$publish @ angular2-polyfills.js:451(anonymous function) @ angular2-polyfills.js:123microtask @ angular2.dev.js:13575Zone.run @ angular2-polyfills.js:1243(anonymous function) @ angular2.dev.js:13543zoneBoundFn @ angular2-polyfills.js:1220lib$es6$promise$asap$$flush @ angular2-polyfills.js:262 angular2.dev.js:23597 ORIGINAL STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:23597ExceptionHandler.call @ angular2.dev.js:1272(anonymous function) @ angular2.dev.js:12576NgZone._notifyOnError @ angular2.dev.js:13620collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:13524Zone.run @ angular2-polyfills.js:1247(anonymous function) @ angular2.dev.js:13543zoneBoundFn @ angular2-polyfills.js:1220lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:468lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:480lib$es6$promise$$internal$$publish @ angular2-polyfills.js:451(anonymous function) @ angular2-polyfills.js:123microtask @ angular2.dev.js:13575Zone.run @ angular2-polyfills.js:1243(anonymous function) @ angular2.dev.js:13543zoneBoundFn @ angular2-polyfills.js:1220lib$es6$promise$asap$$flush @ angular2-polyfills.js:262
The text was updated successfully, but these errors were encountered: