-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
rc-0: Extending router-outlet with deprecated router fails silently #8427
Comments
To fix your problem you can do this: For me this works. |
Thanks @PinkTiu I tried it and It kind of works, in that the component gets instantiated, but unfortunately none of the extra services my app uses are injected into it - like it sees it as RouterOutlet and nothing more. I'll have a play around with it and see if I can solve the DI part. |
If you don't modify the name of the selector it works for me: https://github.com/blacksonic/angular2-esnext-starter/blob/master/client/app/auth/directives/router_outlet.js |
Thanks @BlackSonic that approach seems to do the trick - using the same selector and also adding the |
The |
I'm using typescript but needed that as well. |
Tracked this down in core, working on a PR to fix. |
i tried with RC1 and i m still facing the same issue : silent fail... |
Updated from RC0 -> RC1: |
It didn't work for me with a custom name so IMO it's still not really fixed properly - you could envisage a situation where you have a standard and custom outlet in a page which currently wouldn't be possible. |
was just able to get this working much like blacksonic's version (although his path change slightly from the link above) i had to use a diff selector name as well |
We are no longer maintaining the deprecated router to focus our efforts on making the new router solid. You can add security to routes by using guards instead of extending outlets in the new router. But you also should be able to extend outlets. Closing this issue. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Steps to reproduce and a minimal demo of the problem
See plunker:
http://plnkr.co/edit/wiyXdxEMQ2hV8wI9frwn?p=preview
Current behavior
No
<custom-router>
outlet renderedExpected/desired behavior
<custom-router>
outlet is renderedOther information
This is commonly used for adding security to routes and worked upto latest RC-0
No error messages are displayed, the code fails silently and the component is never instantiated
The text was updated successfully, but these errors were encountered: