Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- 'use strict';
- angular
- .module('directives.selectBox', [])
- .directive('selectBox', selectBox);
- function selectBox() {
- return {
- restrict : 'E',
- require : ['ngModel', 'selectBox'],
- scope : {
- list : '=',
- formCtrl : '='
- },
- replace : true,
- templateUrl : 'common/directives/selectBox/selectBox.html',
- link: link,
- controller : SelectBoxController,
- controllerAs: 'vm',
- bindToController: true
- };
- function link (scope, element, attrs, controllers){
- }
- }
- function SelectBoxController(scope) {
- var vm = this;
- vm.select = select;
- vm.selected = null;
- //////////////////////
- function select(item){
- vm.selected = item;
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement