From b7af76b4c5aa77648cc1bfd49935b48583419023 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 11 Oct 2013 12:58:57 -0700 Subject: fix(directives): correct priority of structural directives BREAKING CHANGE: the priority of ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView has changed. This could affect directives that explicitly specify their priority. In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView work together in all common scenarios their directives are being adjusted to achieve the following precendence: Directive | Old Priority | New Priority ============================================= ngRepeat | 1000 | 1000 --------------------------------------------- ngSwitchWhen | 500 | 800 --------------------------------------------- ngIf | 1000 | 600 --------------------------------------------- ngInclude/ngView | 1000 | 400 --- src/ng/directive/ngSwitch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ng/directive/ngSwitch.js') diff --git a/src/ng/directive/ngSwitch.js b/src/ng/directive/ngSwitch.js index 34f571ce..8087390a 100644 --- a/src/ng/directive/ngSwitch.js +++ b/src/ng/directive/ngSwitch.js @@ -165,7 +165,7 @@ var ngSwitchDirective = ['$animate', function($animate) { var ngSwitchWhenDirective = ngDirective({ transclude: 'element', - priority: 500, + priority: 800, require: '^ngSwitch', compile: function(element, attrs, transclude) { return function(scope, element, attr, ctrl) { @@ -177,7 +177,7 @@ var ngSwitchWhenDirective = ngDirective({ var ngSwitchDefaultDirective = ngDirective({ transclude: 'element', - priority: 500, + priority: 800, require: '^ngSwitch', compile: function(element, attrs, transclude) { return function(scope, element, attr, ctrl) { -- cgit v1.2.3