In the process of developing my Angular 2 application with Typescript using angular 2 rc.1, I've noticed that the official Angular 2 documentation has not been updated yet.
I had references to ComponentInstruction Interface and CanActivate decorator in my codebase, only to find out that they are no longer available in angular2-rc.1. I'm wondering what alternatives should be used instead.
One of the classes I need to upgrade is shown below:
class RequireUserAnnotation extends CanActivate {
constructor() {
super(this.canProceed.bind(this));
}
canProceed(prev: ComponentInstruction,
next: ComponentInstruction) {
return !!Meteor.user();
}
}
The new @angular/router package introduces CanDeactivate and OnActivate functionalities, which I find a bit confusing.
Upon checking the CanDeactivate interface in the official docs, it appears that there might also be issues with its information as it references ComponentInstruction, despite its absence in the latest Angular version.
Instead of reverting to the deprecated angular/@router-deprecated package, I am determined to solve this issue. Any insights or guidance on how to tackle this problem would be highly appreciated.