Hello,

I want to check a login before navigating to a component. In the TS version 
there is the "AuthGuard"-Possibility, in Angular Dart there is a 
@CanActivate annotation for the component.

Unfortunately this decorator wants a anonymous function, completely 
decoupled from the component and all injected services.

My question is: How can I check things BEFORE the router navigates to a 
component?

I tried:

1. subscribing to the router change in the parent component -> 
notifications are too late to intercept
2. use the OnActivate implementation in the component -> called AFTER 
navigation

How can I use the opposite of CanDeactivate properly to prevent or allow a 
navigation to the component?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"angular-dart" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular-dart+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular-dart.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular-dart/475f5aca-e20c-4775-91a1-99a86c267976%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to