vormjs
Version:
Write your forms in JSON and HTML, use the same API.
31 lines (21 loc) • 470 B
JavaScript
/*global angular,_*/
(function ( ) {
angular.module('vorm')
.directive('vormFocusableList', [ function ( ) {
return {
controller: [ function ( ) {
let ctrl = this,
ids = [];
ctrl.addId = function ( id ) {
ids.push(id);
};
ctrl.removeId = function ( id ) {
_.pull(ids, id);
};
ctrl.getId = function ( ) {
return ids[ids.length-1];
};
}]
};
}]);
})();