Thanks Hans, it works, but how can I pass the urlParams ?

There are 3 navigate methods defined in Router, and I am a sort of miss the
navigateByComponentInstruction() version to make my life easier.

Zsolt



On 3 February 2016 at 14:55, HansMeise <[email protected]> wrote:

> Hi,
>
> you can use Router.navigateByUrl(url):
>
> So for your example it should be:
>
> this.router.navigateByUrl(prevComponent.urlPath);
>
>
>
> Am Mittwoch, 3. Februar 2016 13:03:51 UTC+1 schrieb Zsolt Kovács:
>>
>> Hi,
>>
>> I need to implement login using routing. In principle all my components
>> need authentication, so I implemented custom router outlet, which redirects
>> to Login component and the login shall redirect back to the original
>> component. To achieve that the Login implements routerOnActivate(next,
>> prev) to store the previous component, and onSubmit() it shall be used
>> to redirect, but I could not figure out how to use the
>> ComponentInstruction.
>>
>> Code is available here:
>>
>>
>> https://github.com/kovax/cristal-webui/blob/master/src/app/directives/auth-router-outlet/auth-router-outlet.ts
>>
>> https://github.com/kovax/cristal-webui/blob/master/src/app/components/login/login.ts
>>
>> Thanks,
>>
>> Zsolt
>>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to