angular 2 rc.1でtypescriptを使用してangular2アプリケーションを作成しています
angular 2ドキュメントはまだ更新されていないと思います。
https://angular.io/docs/ts/latest/api/router/ComponentInstruction-interface.html
https://angular.io/docs/ts/latest/api/router/CanActivate-decorator.html
ComponentInstruction インターフェイスと CanActivate デコレータは angular2-rc.1 では利用できなくなりました。代わりに何がありますか?
最新の角度バージョンにアップグレードする必要がある次のクラスがあります。
class RequireUserAnnotation extends CanActivate {
constructor() {
super(this.canProceed.bind(this));
}
canProceed(prev: ComponentInstruction,
next: ComponentInstruction) {
return !!Meteor.user();
}
}
新しい @angular/router パッケージに CanDeactivate と OnActivate が追加されました。それは私を少し混乱させます。
https://angular.io/docs/js/latest/api/router/CanDeactivate-interface.html
も更新されていないと思い
ます: The routerCanDeactivate hook is called with two ComponentInstructions as parameters
、 ComponentInstruction はもう定義されていません。
angular/@router-deprecated
パッケージは使いたくない。これを直したい!お願いします!:)
この問題に関する情報をいただければ幸いです。