It needs to be an opt-in feature since any existing users of ng-stomp might already be using $scope.$apply and recursive use causes the Angular error: angular.js:14110 Error: [$rootScope:inprog] http://errors.angularjs.org/1.5.9/$rootScope/inprog?p0=%24apply
This introduces a new $stomp.setScopeApply(apply) option to simplify subscription callbacks that are making
$scope
content changes.Here is an example of using this option:
It needs to be an opt-in feature since any existing users of
ng-stomp
might already be using$scope.$apply
and recursive use causes the Angular error:angular.js:14110 Error: [$rootScope:inprog] http://errors.angularjs.org/1.5.9/$rootScope/inprog?p0=%24apply