Search Posts

Category: model-view-controller

Change made to $scope variable through event captured by $rootScope doesn’t update in view

I have a somewhat old ionic App (ionic v 1.3.x). Based on certain asynchronous changes detected in another part of the App it emits $rootScope level events. I catch that event in a Controller to update the view when that event is caught. Something along the lines below. // In a different part of the App an asynchronous event is caught $rootScope.$emit(“some:change:event”, grpKey); // from asynchronous event // In Controller $rootScope.$on(“some:change:event”, function(event, param){ reComputeValues(param); } […]