Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/apply-safely-for-angular
Calls fn with or without scope.$apply(), depending on if current thread is already inside $apply(). For AngularJS.
https://github.com/hugojosefson/apply-safely-for-angular
Last synced: 29 days ago
JSON representation
Calls fn with or without scope.$apply(), depending on if current thread is already inside $apply(). For AngularJS.
- Host: GitHub
- URL: https://github.com/hugojosefson/apply-safely-for-angular
- Owner: hugojosefson
- Created: 2013-05-22T14:13:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-10T20:41:08.000Z (over 11 years ago)
- Last Synced: 2024-11-09T03:38:14.558Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# apply-safely-for-angular
Calls `fn` with or without `scope.$apply()`, depending on if current thread is already inside `$apply()`. For AngularJS.
## Installation
### As a [component](https://github.com/component/component)
$ component install hugojosefson/apply-safely-for-angular
### With [Bower](http://bower.io/)
$ bower install hugojosefson-apply-safely-for-angular
## API
require("applySafely");
// Example use
angular.module("yourModule", []).controller("yourController", function($scope, applySafely) {someNonAngularCodeWhichCallsBack("params", function callback(result) {
applySafely($scope, function() {
$scope.result = result;
});
});});
## License
MIT