File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
modules/@angular/core/src/linker Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -279,8 +279,7 @@ export abstract class AppView<T> {
279
279
280
280
detectChanges ( throwOnChange : boolean ) : void {
281
281
var s = _scope_check ( this . clazz ) ;
282
- if ( this . cdMode === ChangeDetectionStrategy . Detached ||
283
- this . cdMode === ChangeDetectionStrategy . Checked ||
282
+ if ( this . cdMode === ChangeDetectionStrategy . Checked ||
284
283
this . cdState === ChangeDetectorState . Errored )
285
284
return ;
286
285
if ( this . destroyed ) {
@@ -304,13 +303,17 @@ export abstract class AppView<T> {
304
303
305
304
detectContentChildrenChanges ( throwOnChange : boolean ) {
306
305
for ( var i = 0 ; i < this . contentChildren . length ; ++ i ) {
307
- this . contentChildren [ i ] . detectChanges ( throwOnChange ) ;
306
+ var child = this . contentChildren [ i ] ;
307
+ if ( child . cdMode === ChangeDetectionStrategy . Detached ) continue ;
308
+ child . detectChanges ( throwOnChange ) ;
308
309
}
309
310
}
310
311
311
312
detectViewChildrenChanges ( throwOnChange : boolean ) {
312
313
for ( var i = 0 ; i < this . viewChildren . length ; ++ i ) {
313
- this . viewChildren [ i ] . detectChanges ( throwOnChange ) ;
314
+ var child = this . viewChildren [ i ] ;
315
+ if ( child . cdMode === ChangeDetectionStrategy . Detached ) continue ;
316
+ child . detectChanges ( throwOnChange ) ;
314
317
}
315
318
}
316
319
You can’t perform that action at this time.
0 commit comments