diff options
| author | Igor Minar | 2012-06-12 00:35:28 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-06-12 01:09:07 -0700 |
| commit | 9af7a9198e2d30608ea6c40eedde03e44a6ef569 (patch) | |
| tree | 24249e527de5b833d95cb733e461a20ef71d28d6 /docs/content | |
| parent | 74fa65ecb7c4e2df966a179952b35700912e065f (diff) | |
| download | angular.js-9af7a9198e2d30608ea6c40eedde03e44a6ef569.tar.bz2 | |
fix($defer): remove deprecated $defer service
Diffstat (limited to 'docs/content')
| -rw-r--r-- | docs/content/guide/dev_guide.services.managing_dependencies.ngdoc | 6 | ||||
| -rw-r--r-- | docs/content/guide/scope.ngdoc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc index 54d7a5d1..e6f6aa43 100644 --- a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc +++ b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc @@ -50,7 +50,7 @@ provided by Angular's web framework: * @param {*} message Message to be logged. */ function batchLogModule($provide){ - $provide.factory('batchLog', ['$defer', '$log', function($defer, $log) { + $provide.factory('batchLog', ['$timeout', '$log', function($timeout, $log) { var messageQueue = []; function log() { @@ -58,7 +58,7 @@ provided by Angular's web framework: $log('batchLog messages: ', messageQueue); messageQueue = []; } - $defer(log, 50000); + $timeout(log, 50000); } // start periodic checking @@ -88,7 +88,7 @@ provided by Angular's web framework: Things to notice in this example: -* The `batchLog` service depends on the built-in {@link api/ng.$defer $defer} and +* The `batchLog` service depends on the built-in {@link api/ng.$timeout $timeout} and {@link api/ng.$log $log} services, and allows messages to be logged into the `console.log` in batches. * The `routeTemplateMonitor` service depends on the built-in {@link api/ng.$route diff --git a/docs/content/guide/scope.ngdoc b/docs/content/guide/scope.ngdoc index ac0089c9..5b2c08ab 100644 --- a/docs/content/guide/scope.ngdoc +++ b/docs/content/guide/scope.ngdoc @@ -259,7 +259,7 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model api/ng.$rootScope.Scope#$apply scope.$apply()}. (Angular apis do this implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers, or asynchronous work with {@link api/ng.$http $http} or {@link - api/ng.$defer $defer} services. + api/ng.$timeout $timeout} services. 4. **Mutation observation** |
