From e7529f81e83031666d3de59c4f0dab660eee8d15 Mon Sep 17 00:00:00 2001 From: Jens Rantil Date: Mon, 20 May 2013 18:43:49 +0200 Subject: [PATCH 1/2] docs(guide/directive): clarify default priority This patch was based on https://github.com/angular/angular.js/blob/master/src/ng/compile.js#L193 This partially fixes #2644. --- docs/content/guide/directive.ngdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 22dd639ee970..c37c57045bbe 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -333,7 +333,8 @@ compiler}. The attributes are: * `priority` - When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The `priority` is used to sort the directives before their `compile` functions get called. Higher `priority` goes - first. The order of directives within the same priority is undefined. + first. The order of directives within the same priority is undefined. The default priority is + `0`. * `terminal` - If set to true then the current `priority` will be the last set of directives which will execute (any directives at the current priority will still execute From 2e7fbedc1785b681ffd55081ee00fc948c0151dc Mon Sep 17 00:00:00 2001 From: Jens Rantil Date: Mon, 20 May 2013 18:51:24 +0200 Subject: [PATCH 2/2] docs(guide/directive): clarify priority comparison This fixes #2644. --- docs/content/guide/directive.ngdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index c37c57045bbe..9c8eda880bca 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -332,9 +332,9 @@ compiler}. The attributes are: * `priority` - When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The `priority` is used - to sort the directives before their `compile` functions get called. Higher `priority` goes - first. The order of directives within the same priority is undefined. The default priority is - `0`. + to sort the directives before their `compile` functions get called. Priority is defined as a + number. Directives with greater `priority` number goes first. The order of directives with + the same priority is undefined. The default priority is `0`. * `terminal` - If set to true then the current `priority` will be the last set of directives which will execute (any directives at the current priority will still execute