fix(router): wildcard don't get notified on url changes

This commit is contained in:
vsavkin
2016-06-24 12:23:42 -07:00
parent 1a145ac500
commit 54edce2bab
3 changed files with 38 additions and 7 deletions

View File

@ -6,6 +6,14 @@
* found in the LICENSE file at https://angular.io/license
*/
export function shallowEqualArrays(a:any[], b:any[]):boolean {
if (a.length !== b.length) return false;
for (let i = 0; i < a.length; ++i) {
if (!shallowEqual(a[i], b[i])) return false;
}
return true;
}
export function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {
const k1 = Object.keys(a);
const k2 = Object.keys(b);