UI component for handling code retrival with seperate input elements
npm i ng-code-input
Include the ng-code-input modules in your application
var app = angular.module('myapp', ['ng-code-input']);
The most basic use of the directive in html
<ng-code
ng-model="ctrl.code"
digits="3"
class="my-custom-class">
</ng-code>
With a related angular controller:
angular.module('myapp')
.controller('ctrl', ['$scope', function ($scope){
$scope.code = null;
}]);
Attribute | Description | Default value | Required |
---|---|---|---|
digits | number of digits to display | 3 | optional |
class | custom class | default | optional |