(function () { 'use strict'; var serviceId = 'fullScreenLoaderContext'; var app = angular.module('fullScreenLoader'); function datacontext() { var vm = this; vm.state = { visible: false, text:"" } var service = { show: show, hide: hide, state: vm.state }; return service; function show(sentText){ vm.state.visible = true; if (sentText) { vm.state.text = sentText; } } function hide() { vm.state.visible = false; } } app.factory(serviceId, [datacontext]); function fullScreenLoaderController(fsl) { var vm = this; vm.fslState = fsl.state; activate(); function activate() { } } app.controller('fullScreenLoaderController', ['fullScreenLoaderContext', fullScreenLoaderController]); })();