I try to change the value in scoop via ng-click
, ng-click='currentTab = 1'
or ng-click='currentTab = 2'
, these are the “Normal” buttons, thus $scope.currentTab
will change its value. There is also a 3rd “Funk” button that also changes the currentTab value, but already using the function in the controller. And when I click on "Funk" - the correct number is assigned, by clicking on "Normal" - it changes, but after the "Normal" button "Funk" the button no longer works. The function in the controller for the "Funk" button is simple:
$scope.change = function() { $rootScope.currentTab = 1; }
In this case, it is not interesting why it doesn’t want to change it back from the RTC, because in general there should be no difference .. example plankr: https://plnkr.co/edit/yntkXTRS7YC0EgfSNr9k?p=preview
upd: it will work correctly with $ scope, but it’s interesting with $ rootScope what's the matter ..