I\'m trying to have a bootstraps navbar display and remove html elements defendant on data from an angular controller.
I have the following jade code:
When Angular $scope properties are changed "outside" of Angular, $scope.$apply()
needs to be called to cause Angular to enter its digest loop. Any properties that are projected onto the current view will have $watches, which the digest loop will evaluate. When a change is detected in one of these $watches, the view is updated.
Examples of "outside" of Angular:
element.bind('someEvent', function() {
//need to call scope.$apply in here
})
logout
above.