refactor(core): Removed readonly getters and changed to readonly (#19225)

variables
This commit is contained in:
tinayuangao
2017-09-29 00:36:29 +08:00
committed by Victor Berchet
parent 3aa3d5c548
commit 2b84b86fc0
14 changed files with 64 additions and 46 deletions

View File

@ -26,8 +26,10 @@ import {andObservables, forEach, shallowEqual, wrapIntoObservable} from './utils
import {TreeNode, nodeChildrenAsMap} from './utils/tree';
class CanActivate {
constructor(public path: ActivatedRouteSnapshot[]) {}
get route(): ActivatedRouteSnapshot { return this.path[this.path.length - 1]; }
readonly route: ActivatedRouteSnapshot;
constructor(public path: ActivatedRouteSnapshot[]) {
this.route = this.path[this.path.length - 1];
}
}
class CanDeactivate {