Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 521 Bytes

README.textile

File metadata and controls

17 lines (11 loc) · 521 Bytes

Safe Apply for AngularJS

Based on code from https://github.com/yearofmoo/AngularJS-Scope.SafeApply

  1. Open bower.json
  2. Add "angular-safeapply": "~1.0.0" to your dependency list
  3. Run bower install
  4. In your application you can now add:
    • <script src="components/angular-safeapply/safe-apply.js"></script>

Usage

Add SafeApply to your apps module dependancy list then

  1. on any scope: $scope.$safeApply(function() { optionalFunction; });
  2. or used as a service: $safeApply($scope, function() {});