Peter,

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

It is actually based on this tutorial:

https://auth0.com/blog/2015/05/14/creating-your-first-real-world-angular-2-app-from-authentication-to-calling-an-api-and-everything-in-between/

Zsolt

On 4 February 2016 at 15:15, PeterZ <[email protected]> wrote:

> Zsolt,
>
> Can you show me how you're using the AuthRouterOutlet? If try to register
> it in boot.ts I keep getting "Cannot resolve all parameters for 'Router'(?,
> ?, ?)"
>
> Thanks.
>
>
> On Wednesday, February 3, 2016 at 7:03:51 AM UTC-5, Zsolt Kovács wrote:
>>
>> 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