blob: 7605eecf46366c26567a7238034ec21591d2b894 (
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
50
51
52
53
|
(function() {
'use strict';
angular
.module('moon')
.controller('ModelViewController', ModelViewController);
ModelViewController.$inject = ['$scope', 'metaRuleService'];
function ModelViewController($scope, metaRuleService) {
var view = this;
/*
*
*/
view.model = $scope.model;
view.meta_rules_values = false;
activate();
function activate(){
if(view.model.meta_rules.length > 0 ){
findMetaRules();
}else{
view.meta_rules_values = [];
}
}
function findMetaRules(){
metaRuleService.findSomeWithMetaData(view.model.meta_rules).then(function(metaRules){
view.meta_rules_values = metaRules;
view.model.meta_rules_values = metaRules;
});
}
}
})();
|