File size: 778 Bytes
7f88cfb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(function() {
    'use strict';

    angular
        .module('weatheropendataApp')
        .controller('WeatherEnergyDeleteController',WeatherEnergyDeleteController);

    WeatherEnergyDeleteController.$inject = ['$uibModalInstance', 'entity', 'WeatherEnergy'];

    function WeatherEnergyDeleteController($uibModalInstance, entity, WeatherEnergy) {
        var vm = this;

        vm.weatherEnergy = entity;
        vm.clear = clear;
        vm.confirmDelete = confirmDelete;
        
        function clear () {
            $uibModalInstance.dismiss('cancel');
        }

        function confirmDelete (id) {
            WeatherEnergy.delete({id: id},
                function () {
                    $uibModalInstance.close(true);
                });
        }
    }
})();