Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

chore($compile): remove special case for ngIf and ngRepeat

  • Loading branch information...
commit becd7f9caea94597f8e09da037eaeed799c718d2 1 parent 4b4749c
@btford authored
View
7 src/ng/compile.js
@@ -1173,9 +1173,10 @@ function $CompileProvider($provide) {
}
if (directiveValue = directive.transclude) {
- // Special case ngRepeat so that we don't complain about duplicate transclusion, ngRepeat
- // knows how to handle this on its own.
- if (directiveName !== 'ngRepeat' && directiveName !== 'ngIf') {
+ // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.
+ // This option should only be used by directives that know how to how to safely handle element transclusion,
+ // where the transcluded nodes are added or replaced after linking.
+ if (!directive.$$tlb) {
assertNoDuplicate('transclusion', transcludeDirective, directive, $compileNode);
transcludeDirective = directive;
}
View
1  src/ng/directive/ngIf.js
@@ -84,6 +84,7 @@ var ngIfDirective = ['$animate', function($animate) {
priority: 600,
terminal: true,
restrict: 'A',
+ $$tlb: true,
compile: function (element, attr, transclude) {
return function ($scope, $element, $attr) {
var block = {}, childScope;
View
1  src/ng/directive/ngRepeat.js
@@ -214,6 +214,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
transclude: 'element',
priority: 1000,
terminal: true,
+ $$tlb: true,
compile: function(element, attr, linker) {
return function($scope, $element, $attr){
var expression = $attr.ngRepeat;
Please sign in to comment.
Something went wrong with that request. Please try again.