1window.angular && (function (angular) { 2 'use strict'; 3 4 angular 5 .module('app.common.directives') 6 .directive('firmwareList', ['APIUtils', function (APIUtils) { 7 return { 8 'restrict': 'E', 9 'templateUrl': 'common/directives/firmware-list.html', 10 'scope': { 11 'title': '@', 12 'firmwares': '=', 13 'filterBy': '=', 14 'version': '=' 15 }, 16 'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){ 17 $scope.dataService = dataService; 18 $scope.activate = function(imageId){ 19 $scope.$parent.activateImage(imageId); 20 } 21 22 $scope.delete = function(imageId){ 23 $scope.$parent.deleteImage(imageId); 24 } 25 }] 26 }; 27 }]); 28})(window.angular);