feat(router): add support for CanActivate guard

This commit is contained in:
vsavkin
2016-06-01 14:32:15 -07:00
parent 99f7404d8b
commit c5cca8e098
10 changed files with 249 additions and 74 deletions

View File

@ -28,6 +28,10 @@ export function first<T>(a: T[]): T | null {
return a.length > 0 ? a[0] : null;
}
export function and(bools: boolean[]): boolean {
return bools.reduce((a,b) => a && b, true);
}
export function merge<V>(m1: {[key: string]: V}, m2: {[key: string]: V}): {[key: string]: V} {
var m: {[key: string]: V} = {};