I'm trying to use $rootScope to pass a boolean between two files and works perfectly... ONCE. Then, it does not change even tho the CLICKED log appears.
What the hell??
navbar.html
ng-click="openRightSideMenu(); // Works well
navbar.js
$scope.openRightSideMenu = () => {
console.log("CLICKED") // this always logs, so ng-click is working well
$rootScope.rightSideMenuOpen = true; // Opens the sideMenu but ONLY WORKS ONCE!! It's not change to true the second time
}
sideMenu.html
ng-class="rightSideMenuOpen ? 'open' : 'closed'" // Toogle between open
// and closed, works well but I cannot open the second time
ng-click="rightSideMenuOpen = false" // Close works well
Any idea why $rootScope.rightSideMenuOpen only works once and doesn't change the second time??