Skip to content

cotag/angular-safeapply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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() {});