December 2017
Intermediate to advanced
282 pages
5h 54m
English
Create an ojInputNumber component using the ojComponent binding with an ID. To review the value of the number element, create an HTML label with the for attribute referring to the value of the ID from ojInputNumber. Populate the value from the model layer. The following is the example for the input number component:
<form id="form1"> <label for="age">Age:</label> <input id="age" data-bind="ojComponent: {component: 'ojInputNumber', max:max, min:min, step:step, value:currentAge}"/> <br/> <hr/> <span>Age value is: </span> <span id="curr-value" data-bind="text: currentAge"></span> </form>
require(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojknockout', 'ojs/ojinputnumber'], function(oj, ko, $) { function ...Read now
Unlock full access