Last active
April 3, 2016 16:29
-
-
Save jamesmorgan/7c8017a5e5774ac3f2fe40ea9f4055c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a special hook because it is called before your component is instantiated. | |
* Its parameters are (next, previous) which are the components you're routing to and the component | |
* you've come from (or null if you have no history) respectively. | |
*/ | |
@CanActivate((next, prev) => { | |
// No simple way to load data, how to easily inject services or how to provide the result to componenet once loaded. | |
// Work arounds can be found but are not ideal IMHO. | |
return true; | |
}) | |
export class DashboardComponent { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment