Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$timeout no longer causes a digest #9175

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/content/error/$rootScope/inprog.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ your callback handler to always run asynchronously by using the `$timeout` servi
```
function MyController($scope, thirdPartyComponent) {
thirdPartyComponent.getData(function(someData) {
$timeout(function() {
$timeout(function() {}).then(function(){
$scope.someData = someData;
}, 0);
});
Expand Down Expand Up @@ -170,7 +170,7 @@ myApp.directive('setFocusIf', function($timeout) {
link: function($scope, $element, $attr) {
$scope.$watch($attr.setFocusIf, function(value) {
if ( value ) {
$timeout(function() {
$timeout(function() {}).then(function(){
// We must reevaluate the value in case it was changed by a subsequent
// watch handler in the digest.
if ( $scope.$eval($attr.setFocusIf) ) {
Expand Down