Every line of 'valuechanges angular2' 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.
23 _handleChangeEvent() { 24 this.handleChangeEvent(this.el.nativeElement, this.el.nativeElement.value); 25 }
67 ngOnChanges(changes: SimpleChanges) { 68 let valueChange = changes['value']; 69 if (valueChange && !valueChange.isFirstChange()) { 70 // this.path.slice is used to pass by value not by reference, because the function might modify the path 71 this.onValueChange(this.path.slice(), valueChange.currentValue, this.jsonStoreService); 72 // force to detect changes since onValueChange might change some other parts of top level json 73 this.changeDetectionRef.detectChanges(); 74 } 75 }
414 optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) { 415 // This method is overwritten in ngOptions and has side-effects! 416 self.readValue(); 417 418 var removal; 419 var previouslySelected = optionElement.prop('selected'); 420 421 if (isDefined(oldVal)) { 422 self.removeOption(oldVal); 423 removal = true; 424 } 425 oldVal = newVal; 426 self.addOption(newVal, optionElement); 427 428 if (removal && previouslySelected) { 429 scheduleViewValueUpdate(); 430 } 431 });
126 _onChange(value) { 127 this.ref.setAttribute(this.key, value); 128 }
46 get valueChanges(): Observable { return this.control ? this.control.valueChanges : null; }
94 setValue(value) { 95 // update the model 96 this.ngModel.$setViewValue(value[this.selectKeyProperty]); 97 this.ngModel.$render(); 98 99 // close the drop down 100 this.close(); 101 }
168 function Ng1Change(previousValue, currentValue) { 169 this.previousValue = previousValue; 170 this.currentValue = currentValue; 171 }
130 public onChange(to: unknown): void { 131 for (let i = 0; i < this.options.length; i++) { 132 if (this.options[i].value === to) { 133 this.selected = i; 134 return; 135 } 136 } 137 138 this.selected = -1; 139 }
129 valueChanged(val) { 130 if (val === null || val === undefined) { 131 this.sui('clear') 132 } else { 133 if (this.multiple === true && this.selectedItems.toString() != val.toString()) { 134 this.sui('set exactly', val); 135 } else 136 this.sui('set selected', val); 137 } 138 }
195 public writeValue(value: any) { 196 this.model = value; 197 this.refreshView(); 198 }