I have something like
myApp.run(function ($rootScope, $window, $location) {
$rootScope.empty_nav = function (showme) {
$rootScope.msg_nav_planes=true;
$rootScope.msg_nav_tusplanes=true;
$rootScope.msg_nav_participantes=true;
$rootScope.msg_nav_fotos=true;
$rootScope.msg_nav_listas=true;
$rootScope.msg_nav_back=true;
$rootScope.msg_nav_plan=true;
$rootScope.showme = ''; // this wont work :(
};
});
Where that «true» hides the element. Those elements are navegation links in the header. I swap them depending on which page i am, calling empty_nav() from the corresponding controller. The problem is $rootScope. If i do a console.log() inside the function each item is getting the values correctly, including the selected one. But in the concrete cases (browsing each page), it only hides all the items, but afterwards the indicated item wont fade in.
am I doing something wrong?
PD: I'm thinking also in having only one item and pass to it the link and the text .... instead having so many items :/