diff options
Diffstat (limited to 'src/ng/directive/ngIf.js')
| -rw-r--r-- | src/ng/directive/ngIf.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ng/directive/ngIf.js b/src/ng/directive/ngIf.js index 6e845e28..dcb3825d 100644 --- a/src/ng/directive/ngIf.js +++ b/src/ng/directive/ngIf.js @@ -86,15 +86,14 @@ var ngIfDirective = ['$animate', function($animate) { terminal: true, restrict: 'A', $$tlb: true, - compile: function (element, attr, transclude) { - return function ($scope, $element, $attr) { + link: function ($scope, $element, $attr, ctrl, $transclude) { var block, childScope; $scope.$watch($attr.ngIf, function ngIfWatchAction(value) { if (toBoolean(value)) { if (!childScope) { childScope = $scope.$new(); - transclude(childScope, function (clone) { + $transclude(childScope, function (clone) { block = { startNode: clone[0], endNode: clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ') @@ -115,7 +114,6 @@ var ngIfDirective = ['$animate', function($animate) { } } }); - }; } }; }]; |
