Skip to content

Commit 92c7fec

Browse files
committed
angular.js - hotfix for ngIf
1 parent 3baa99e commit 92c7fec

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/angular.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -17812,15 +17812,17 @@ var ngIfDirective = ['$animate', function($animate) {
1781217812
$scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
1781317813

1781417814
if (toBoolean(value)) {
17815+
if (!block) {
1781517816

17816-
childScope = $scope.$new();
17817-
transclude(childScope, function (clone) {
17818-
block = {
17819-
startNode: clone[0],
17820-
endNode: clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ')
17821-
};
17822-
$animate.enter(clone, $element.parent(), $element);
17823-
});
17817+
childScope = $scope.$new();
17818+
transclude(childScope, function (clone) {
17819+
block = {
17820+
startNode: clone[0],
17821+
endNode: clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ')
17822+
};
17823+
$animate.enter(clone, $element.parent(), $element);
17824+
});
17825+
}
1782417826

1782517827
} else {
1782617828

0 commit comments

Comments
 (0)