Hello, I want to create a onboarding for my app. This is just a single page containing slides. Now this should be just shown, when the user enters the app the first time. For this, I thought I add an item ‘onboarded’ to the localStorage. Now the guard just needs to look if it gets a response when calling this property:
canActivate() {
this.storageService.get(Constants.ONBOARDED).then( res => {
if(!res) {
return true;
} else {
return false;
}
})
}
Now I have the problem, that not all paths return a value. Should I put the Prmoise in the onInit or is there a way to use a resolver to push the data to the guard before it is actually called?
2 posts - 1 participant