| Name |
Last commit
|
Last update |
|---|---|---|
| dist | ||
| hack | ||
| src | ||
| test | ||
| .editorconfig | ||
| .gitignore | ||
| .jshintrc | ||
| .npmignore | ||
| .travis.yml | ||
| Gruntfile.js | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| bower.json | ||
| package.json |
- provides mechanism to keep WebSockets from spamming the $digest loop
- flips invokeApply passed to the internal $timeout calls,
stopping a $digest loop & avoiding a render.
- DataService._watchOpOnMessage also honors the skipDigest flag,
which is plumbed down through .watch() -> .startListOp -> ._listOpComplete -> ._startWatchOp -> ._watchOpOnMessage
example usage:
DataService.watch(resource, context, (data) => {
// optionally call $applyAsync here in controlling code
// to manually run a $digest
$scope.$applyAsync(() => {
// do stuff with data here
});
}, { skipDigest: true });
// or Debounce
DataService.watch(resource, context, _.debounce(() => {
// $apply here, inside debounce
}, 400), { skipDigest: true });
| Name |
Last commit
|
Last update |
|---|---|---|
| dist | Loading commit data... | |
| hack | Loading commit data... | |
| src | Loading commit data... | |
| test | Loading commit data... | |
| .editorconfig | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .jshintrc | Loading commit data... | |
| .npmignore | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| Gruntfile.js | Loading commit data... | |
| LICENSE | Loading commit data... | |
| Makefile | Loading commit data... | |
| README.md | Loading commit data... | |
| bower.json | Loading commit data... | |
| package.json | Loading commit data... |