refactor: format & lint
This commit is contained in:
parent
84400bcc86
commit
d4ddb6004e
@ -576,7 +576,8 @@ function generateDetectChangesMethod(view: CompileView): o.Statement[] {
|
|||||||
}
|
}
|
||||||
stmts.push(...view.detectChangesRenderPropertiesMethod.finish());
|
stmts.push(...view.detectChangesRenderPropertiesMethod.finish());
|
||||||
view.viewChildren.forEach((viewChild) => {
|
view.viewChildren.forEach((viewChild) => {
|
||||||
stmts.push(viewChild.callMethod('internalDetectChanges', [DetectChangesVars.throwOnChange]).toStmt());
|
stmts.push(
|
||||||
|
viewChild.callMethod('internalDetectChanges', [DetectChangesVars.throwOnChange]).toStmt());
|
||||||
});
|
});
|
||||||
const afterViewStmts =
|
const afterViewStmts =
|
||||||
view.updateViewQueriesMethod.finish().concat(view.afterViewLifecycleCallbacksMethod.finish());
|
view.updateViewQueriesMethod.finish().concat(view.afterViewLifecycleCallbacksMethod.finish());
|
||||||
|
@ -1135,20 +1135,20 @@ export function main() {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('Detached view can be checked locally', fakeAsync(() => {
|
it('Detached view can be checked locally', fakeAsync(() => {
|
||||||
const ctx = createCompFixture('<wrap-comp-with-ref></wrap-comp-with-ref>');
|
const ctx = createCompFixture('<wrap-comp-with-ref></wrap-comp-with-ref>');
|
||||||
const cmp: CompWithRef = queryDirs(ctx.debugElement, CompWithRef)[0];
|
const cmp: CompWithRef = queryDirs(ctx.debugElement, CompWithRef)[0];
|
||||||
cmp.value = 'hello';
|
cmp.value = 'hello';
|
||||||
cmp.changeDetectorRef.detach();
|
cmp.changeDetectorRef.detach();
|
||||||
expect(renderLog.log).toEqual([]);
|
expect(renderLog.log).toEqual([]);
|
||||||
|
|
||||||
ctx.detectChanges();
|
ctx.detectChanges();
|
||||||
|
|
||||||
expect(renderLog.log).toEqual([]);
|
expect(renderLog.log).toEqual([]);
|
||||||
|
|
||||||
cmp.changeDetectorRef.detectChanges();
|
cmp.changeDetectorRef.detectChanges();
|
||||||
|
|
||||||
expect(renderLog.log).toEqual(['{{hello}}']);
|
expect(renderLog.log).toEqual(['{{hello}}']);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('Reattaches', fakeAsync(() => {
|
it('Reattaches', fakeAsync(() => {
|
||||||
@ -1364,10 +1364,7 @@ class CompWithRef {
|
|||||||
noop() {}
|
noop() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({selector: 'wrap-comp-with-ref', template: '<comp-with-ref></comp-with-ref>'})
|
||||||
selector: 'wrap-comp-with-ref',
|
|
||||||
template: '<comp-with-ref></comp-with-ref>'
|
|
||||||
})
|
|
||||||
class WrapCompWithRef {
|
class WrapCompWithRef {
|
||||||
constructor(public changeDetectorRef: ChangeDetectorRef) {}
|
constructor(public changeDetectorRef: ChangeDetectorRef) {}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user