From d182202fc6001983541504ed323d68479086317e Mon Sep 17 00:00:00 2001 From: WuKong Date: Sat, 22 Apr 2017 13:25:07 +0200 Subject: add moonv4 Change-Id: I247af788d0b0fb961fbc85416486b241eb1d807c Signed-off-by: WuKong --- .../app/model/action/model.controller.view.js | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 moonv4/moon_gui/static/app/model/action/model.controller.view.js (limited to 'moonv4/moon_gui/static/app/model/action/model.controller.view.js') diff --git a/moonv4/moon_gui/static/app/model/action/model.controller.view.js b/moonv4/moon_gui/static/app/model/action/model.controller.view.js new file mode 100644 index 00000000..7605eecf --- /dev/null +++ b/moonv4/moon_gui/static/app/model/action/model.controller.view.js @@ -0,0 +1,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; + + }); + + } + + } + +})(); -- cgit 1.2.3-korg