blob: 0620277e68af8e5595c26be2cf77c89d991de5ec [file] [log] [blame]
(function () {
'use strict';
angular.module('xos.diagnostic')
.directive('subscriberModal', function(){
return {
scope: {
subscribers: '=',
open: '='
},
bindToController: true,
restrict: 'E',
templateUrl: 'templates/subscriber-modal.tpl.html',
controllerAs: 'vm',
controller: function($rootScope){
this.close = () => {
this.open = false;
};
this.select = (subscriber) => {
$rootScope.$emit('subscriber.selected', subscriber);
this.close();
};
}
};
});
})();