blob: b2ebc45d08e62161c7dd87d8d2cdacbe574dc1df (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
(function() {
'use strict';
angular
.module('moon')
.controller('MetaRulesEditController', MetaRulesEditController);
MetaRulesEditController.$inject = ['$scope', '$rootScope'];
function MetaRulesEditController($scope, $rootScope) {
var edit = this;
edit.metaRule = $scope.metaRule;
activate();
function activate(){
}
/*
* ---- events
*/
var rootListeners = {
'event:metaRuleBasicUpdatedSuccess': $rootScope.$on('event:metaRuleBasicUpdatedSuccess', metaRuleUpdatedSuccess)
};
for (var unbind in rootListeners) {
$scope.$on('$destroy', rootListeners[unbind]);
}
/**
* When the MetaRule is updated, this function refresh the current metaRule with the new changes
* @param event
* @param metaRule
*/
function metaRuleUpdatedSuccess(event, metaRule){
edit.metaRule = metaRule;
}
}
})();
|