Every line of 'ng checked angular 2' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
72 ngAfterViewChecked() { 73 const vc = this.viewChild; 74 75 // viewChild is updated after the view has been checked 76 if ( vc && this.prevHero === vc.hero ) { 77 this.logIt( 'AfterViewChecked (no change)' ); 78 } else { 79 this.prevHero = vc && vc.hero; 80 this.logIt( 'AfterViewChecked' ); 81 this.doSomething(); 82 } 83 }
45 ngAfterViewChecked() { 46 if (this.label !== this._previousLabel) { 47 this._previousLabel = this.label; 48 this.stateChange$.next({ 49 value: this.value, 50 disabled: this._disabled, 51 label: this.elementRef.nativeElement.innerHTML 52 }); 53 } 54 }
15 ngAfterViewChecked(): void { 16 this.cdr.detectChanges(); 17 }
26 ngAfterViewChecked(): void { 27 // Notice that it's not logged every ms 28 console.log('ngAfterViewChecked'); 29 }
73 ngDoCheck() { 74 this.getItems(); 75 }
395 ngAfterViewChecked() { 396 if (this.runUpdatedOnCheck) { 397 this.ngZone.runOutsideAngular(() => { 398 // We need to update the control AFTER the model 399 // has been updated (assuming there is one), so 400 // execute updated after angular has generated 401 // the model and the view markup. 402 setTimeout(() => this.updated()); 403 this.runUpdatedOnCheck = false; 404 }); 405 } 406 }
70 ngAfterViewChecked() { 71 if (this.runUpdatedOnCheck) { 72 73 this.ngZone.runOutsideAngular(() => { 74 // We need to update the control AFTER the model 75 // has been updated (assuming there is one), so 76 // execute updated after angular has generated 77 // the model and the view markup. 78 if (this.fieldFilter) { 79 this.fieldFilter.updated(this._settings); 80 } 81 this.runUpdatedOnCheck = false; 82 }); 83 } 84 }
357 function defaultLinkFn(scope, element, attr) { 358 scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) { 359 attr.$set(attrName, !!value); 360 }); 361 }
211 ngDoCheck(): void { 212 if (this.ngControl) { 213 this.updateErrorState(); 214 } 215 }
53 ngAfterViewChecked(): void { 54 this.changeDetector.detectChanges(); 55 }