Skip to content

Commit

Permalink
angular.js - hotfix for ngIf
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Nov 11, 2013
1 parent 3baa99e commit 92c7fec
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -17812,15 +17812,17 @@ var ngIfDirective = ['$animate', function($animate) {
$scope.$watch($attr.ngIf, function ngIfWatchAction(value) {

if (toBoolean(value)) {
if (!block) {

childScope = $scope.$new();
transclude(childScope, function (clone) {
block = {
startNode: clone[0],
endNode: clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ')
};
$animate.enter(clone, $element.parent(), $element);
});
childScope = $scope.$new();
transclude(childScope, function (clone) {
block = {
startNode: clone[0],
endNode: clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ')
};
$animate.enter(clone, $element.parent(), $element);
});
}

} else {

Expand Down

0 comments on commit 92c7fec

Please sign in to comment.