AIA.factory('ModuleService', function () { return { SaveOpenedModules: function () { console.log('called service'); return true; } }; });