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

variables

PR Close #19842
This commit is contained in:
Yuan Gao
2017-09-15 16:12:02 -07:00
committed by Jason Aden
parent c9ad529afc
commit e544742156
8 changed files with 37 additions and 24 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 {