blob: f805c1a725e492c227f652d794ebfde858a3d950 [file] [log] [blame]
Matteo Scandolo388795a2016-02-22 09:57:55 -08001(function () {
2 'use strict';
3 angular.module('xos.serviceTopology')
4 .directive('subscriberModal', function(){
5 return {
6 scope: {
7 subscribers: '=',
8 open: '='
9 },
10 bindToController: true,
11 restrict: 'E',
12 templateUrl: 'templates/subscriber-modal.tpl.html',
13 controllerAs: 'vm',
14 controller: function($rootScope){
15
16 this.close = () => {
17 this.open = false;
18 };
19
20 this.select = (subscriber) => {
21 $rootScope.$emit('subscriber.selected', subscriber);
22 this.close();
23 };
24 }
25 };
26 });
27})();