chore(router): clang-format
This commit is contained in:
parent
54edce2bab
commit
327d04c9c6
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function shallowEqualArrays(a:any[], b:any[]):boolean {
|
export function shallowEqualArrays(a: any[], b: any[]): boolean {
|
||||||
if (a.length !== b.length) return false;
|
if (a.length !== b.length) return false;
|
||||||
for (let i = 0; i < a.length; ++i) {
|
for (let i = 0; i < a.length; ++i) {
|
||||||
if (!shallowEqual(a[i], b[i])) return false;
|
if (!shallowEqual(a[i], b[i])) return false;
|
||||||
|
@ -991,9 +991,7 @@ class AbsoluteLinkCmp {
|
|||||||
})
|
})
|
||||||
class DummyLinkCmp {
|
class DummyLinkCmp {
|
||||||
private exact: boolean;
|
private exact: boolean;
|
||||||
constructor(route: ActivatedRoute) {
|
constructor(route: ActivatedRoute) { this.exact = (<any>route.snapshot.params).exact === 'true'; }
|
||||||
this.exact = (<any>route.snapshot.params).exact === 'true';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -1004,9 +1002,7 @@ class DummyLinkCmp {
|
|||||||
})
|
})
|
||||||
class DummyLinkWithParentCmp {
|
class DummyLinkWithParentCmp {
|
||||||
private exact: boolean;
|
private exact: boolean;
|
||||||
constructor(route: ActivatedRoute) {
|
constructor(route: ActivatedRoute) { this.exact = (<any>route.snapshot.params).exact === 'true'; }
|
||||||
this.exact = (<any>route.snapshot.params).exact === 'true';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -1029,7 +1025,8 @@ class LinkWithQueryParamsAndFragment {
|
|||||||
class SimpleCmp {
|
class SimpleCmp {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'collect-params-cmp', template: `collect-params`, directives: ROUTER_DIRECTIVES})
|
@Component(
|
||||||
|
{selector: 'collect-params-cmp', template: `collect-params`, directives: ROUTER_DIRECTIVES})
|
||||||
class CollectParamsCmp {
|
class CollectParamsCmp {
|
||||||
private params: any = [];
|
private params: any = [];
|
||||||
private urls: any = [];
|
private urls: any = [];
|
||||||
@ -1039,9 +1036,7 @@ class CollectParamsCmp {
|
|||||||
a.url.forEach(u => this.urls.push(u));
|
a.url.forEach(u => this.urls.push(u));
|
||||||
}
|
}
|
||||||
|
|
||||||
recordedUrls(): string[] {
|
recordedUrls(): string[] { return this.urls.map(a => a.map(p => p.path).join('/')); }
|
||||||
return this.urls.map(a => a.map(p => p.path).join('/'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'blank-cmp', template: ``, directives: ROUTER_DIRECTIVES})
|
@Component({selector: 'blank-cmp', template: ``, directives: ROUTER_DIRECTIVES})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user