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();
}
}
新しい@ angle/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
パッケージを使用しません。私はこれを修正したい!お願いします! :)
問題に関するすべての情報を高く評価します。
が、これはおそらくRCと呼ばれる方法を理解しないでください。 – lexith
これはng-confのためです。これらの人は私たちのために本当に懸命に働いています。このような重要な出来事のためにRCが少し早すぎると発表したとき、私たちは気にしてはいけません。 –
Angular2コアのみがRCです。ルータ(httpのような)はコアの一部とはみなされません。彼らは特有のモジュールとして移動され、最終的にAngular2コアとは独立してバージョン管理されます。彼らは現在、便宜上、 ''角度 '' GitHubリポジトリ内でのみ管理されています。 –