Practice Angularjs's Ng-change event today.
For example, when the user makes a choice, there is no user-appropriate option in the options specified by the system. At this point we can let the user fill out.
The first text box is hidden. It is not displayed until the user selects a checkbox.
The value of IsVisible in the model of the ANGULARJS program is false.
This way, when the program is running, the text box is hidden.
Next, I need to add a checkbox to the program:
The value of the ng-change above is a angularjs name showhide:
Finally take a look at the example and believe you can read and understand the meaning of the expression:
The Complete ANGULARJS code:
var appoo = angular.module (' App1 ', []); Appoo.controller (function ($scope) { false; function () { = $scope. Showotherdescript;}; });
Source Code
Full HTML code:
<DivNg-app= "App1"Ng-controller= "CTRL1"> <inputID= "Checkbox1"type= "checkbox"Ng-model= "Showotherdescript"Ng-change= "showhide ()" />Other Instructions<DivNg-show= "IsVisible"> <inputID= "Text1"type= "text" /> </Div> </Div>
Source Code
Angularjs's Ng-change Event demo