(function(){
angular.module('myApp',[])
})();
(function(){
angular.module('myApp.dashboard',[])
})();
(function(){
angular.module('myApp.value',[])
})();
(function(){
'use strict';
angular.module('myApp.value').service('whichToShow',function(){
alert("running2");
var logged=true;
return {
getVar: function(){
return logged;
},
setVar: function(value){
logged=value;
}
};
});
})();
(function(){
'use strict';
angular.module('myApp.dashboard').controller('mainControl',mainControl);
mainControl.$inject = ['whichToShow'];
alert("running1");
function mainControl(whichToShow){
this.logged=whichToShow.getVar();
alert(this.logged);
};
})();
I am currently developing an app inspired by another existing app, but I am having trouble using a newly defined service. I have been following the code structure of the original app found here. Can you guide me on which part of my code needs modification? It would be helpful if you could make adjustments directly to my code so that I can understand where I went wrong. Thank you!
You can access all of my code in the following link: https://plnkr.co/edit/YeahrG28bT2izX8gMKor?p=preview I have made limited progress so far and my current goal is to hide certain buttons on the interface.