/**
* @ngdoc directives
* @name Multivis
* @module s4c.directives.multivis.Multivis
*
* @description
* `Multivis` Controller do módulo multivis
*
*
*/
(function () {
'use strict';
multivisController.$inject = [
'$scope',
'Preset',
'$q',
'$sce'
];
function multivisController(
$scope,
Preset,
$q,
$sce) {
$scope.res = $scope.$root.res;
var modulos = Preset.obter().PresetModulos;
$scope.presetId = Preset.obter().id;
for (var index in modulos) {
if ((modulos[index].template == 'app/components/modulos/modulo-multivis.html' || (modulos[index].Face && modulos[index].Face.template == 'app/components/modulos/modulo-multivis.html'))
&& !modulos[index].usado) {
modulos[index].usado = true;
$scope.modulo = modulos[index];
modulos[index].index = 1;
$scope.endereco = $sce.trustAsResourceUrl(modulos[index].Face.endereco);
break;
}
}
angular.extend($scope, {
});
}
function s4cMultivis() {
return {
restrict: 'EA',
templateUrl: 'app/directives/multivis/multivis.html',
scope: {},
controller: multivisController
};
}
angular.module('s4c.components.multivis', [])
.directive('s4cMultivis', s4cMultivis);
})();