ngModel changes, ngModelChange is not called

前端 未结 3 592
星月不相逢
星月不相逢 2021-01-18 01:26

The model gets changed b

3条回答
  •  臣服心动
    2021-01-18 01:51

    [(ngModel)] is used for the two way binding like from and to View and component,To use the ngModuleChange we need to split it [()] (Banana into the box) than its become the Property Binding [] and the Event Binding ()

    Inside the component.html

    
    

    And inside the component.ts file , we need to use these setThresholds method which get the value from Editext like below

     setThresholds(getValue)
     {
       console.log(getValue)     
             /**
             * DO YOUR LOGIC HERE
             */
     }
    

    There is also another way to use by the getter and setter property to get and set the data from the view

提交回复
热议问题