access angular.js scope from outside world

علی ذوالفقار
1402/04/19 08:53:52 (160)
// get scope 
var scope = angular.element( $("#myButton") ).scope();

// set scope variable 
scope.currentPage = 2 ;

// apply changes in scope 
scope.$apply();

// call scope function
scope.refreshData();
Back