Every line of 'ngif in react' 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.
1359 detectChangesInInputProps(view:import3.AppView,el:any,throwOnChange:boolean):boolean { 1360 var changed:any = this.changed; 1361 this.changed = false; 1362 if (!throwOnChange) { 1363 if (changed) { 1364 this.context.ngOnChanges(this.changes); 1365 this.changes = {}; 1366 } 1367 if ((view.numberOfChecks === 0)) { this.context.ngOnInit(); } 1368 } 1369 return changed; 1370 }
5 function NgIf(_viewContainer, _templateRef) { 6 this._viewContainer = _viewContainer; 7 this._templateRef = _templateRef; 8 this._prevCondition = null; 9 }
104 function NgIf(_viewContainer, templateRef) { 105 this._viewContainer = _viewContainer; 106 this._context = new NgIfContext(); 107 this._thenTemplateRef = null; 108 this._elseTemplateRef = null; 109 this._thenViewRef = null; 110 this._elseViewRef = null; 111 this._thenTemplateRef = templateRef; 112 }
26 export function detectChanges(component: TreeComponent) { 27 for (let i = 0; i < 10; i++) { 28 ɵdetectChanges(component); 29 } 30 detectChangesRuns += 10; 31 numberOfChecksEl.textContent = `${detectChangesRuns}`; 32 }
34 ngOnChanges(changes) { 35 console.log('ReactComponent ngOnChanges'); 36 if(changes.component) { 37 this.component = changes.component.currentValue; 38 } 39 if(changes.props) { 40 //Did props change? If so, rerender. 41 this.props = changes.props.currentValue; 42 if(this.component) { 43 this.render(this.props); 44 } 45 } 46 }
20 export function isNgComp(value: unknown): value is Type { 21 try { 22 const resolver = getCurrentRenderKit()![COMPONENT_FACTORY_RESOLVER] 23 resolver.resolveComponentFactory(value as any) 24 return true 25 } catch { 26 return false 27 } 28 }
217 callNgOnChanges() { 218 if (!this.implementsOnChanges || this.inputChanges === null) { 219 return; 220 } 221 /** @type {?} */ 222 const inputChanges = this.inputChanges; 223 this.inputChanges = null; 224 (/** @type {?} */ ((((this.componentRef)).instance))).ngOnChanges(inputChanges); 225 }
674 elementRef: function elementRef(ref) { 675 return _this2.contentEl = ref; 676 },
91 get changeDetectorRef() { return this._view.changeDetector.ref; }
38 setState(state: any) { 39 //this.reactAppInstance.setState(state); 40 }