aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
AgeCommit message (Collapse)Author
2014-01-22fix(a): don't preventDefault on click when SVGAElement has an xlink:href ↵Caitlin Potter
attribute Before this change, an SVGAElement with an xlink:href attribute and no href or name attribute which was compiled by the angular HTML compiler would never be clickable, due to the htmlAnchorDirective calling event.preventDefault() due to the missing href attribute. This change corrects this behaviour by also testing the xlink:href attribute if the element in question is determined to be an SVG anchor tag (with the href property having type SVGAnimatedString) Closes #5896 Closes #5897
2014-01-21fix(input): use Chromium's email validation regexpCaitlin Potter
This change uses the regexp from Chromium/Blink to validate emails, and corrects an error in the validation engine, which previously considered an invalid email to be valid. Additionally, the regexp was invalidating emails with capital letters, however this is not the behaviour recomended in the spec, or implemented in Chromium. Closes #5899 Closes #5924
2014-01-21docs(select): add callout style for a noteBrian Ford
2014-01-21docs(select): add object comparison warningDan Matthews
2014-01-19docs(ngEventDirs): document priority of event directivesAbraham
The general assumption is that if @priority is not defined, the priority is 0. BUT it's not necessarily harmful to be explicit about this. Closes #5852
2014-01-18docs(ngInit): ng-init is an attribute/class directive, not an element directiveBastian Buchholz
As discussed in comments on https://github.com/angular/angular.js/commit/42ec95ebae716c81087684b55ed8fa8c13888abc#commitcomment-5109829, ngInit is not an element directive, so @clkao's example should reflect this. Closes #5879
2014-01-18docs(ngInit): note precedence when used with filtersChia-liang Kao
Clears up expression priority issue Closes #3869 Closes #5873
2014-01-17docs(input): document ngValue directiveAbdessamad Idrissi
Extend the example with ng-value showing how to deal with default checked radio boxes. Closes #5654
2014-01-17docs(ngChange): clarify difference between ng-change DOM change eventAndreas Gruenbacher
The ng-change event triggers immediately, which makes a difference for text input fields and text areas, where the JavaScript onchange event would only be called at the end of the change. Closes #5640
2014-01-15docs(ngShowHide): make a note of values considered to be falsyFoxandxss
This issue has been a focus of problems for some users and we discussed it on the IRC that it should be at least documented. ~Amended the style to use bootstrap notes, I think overall it looks better and catches the eyes more easily. However there are no anchor links to these, if these are necessary they can be added later. Closes #3436 Closes #5762
2014-01-10docs(select): update regexp grouping cheat-sheatAjay Roopakalu
Update the regexp grouping comment to reflect the changes needed for multiline expressions in ng-options for <select>. Closes #5602
2014-01-10feat(select): allow multiline ng-optionsAjay Roopakalu
This patch allows the ng-options value of a <select> element to span multiple lines, which would previously throw an error when used with filters. Closes #5602
2014-01-08feat(docs): adding the <doc:protractor> ngdoc-tagJulie
This is the first step in migrating tests from <doc:scenario> to <doc:protractor>. In-documentation examples with doc:protractor sections will have their contents output to a tab on the docs site as well as output to a standalone test file in build/docs/ptore2e.
2014-01-08docs(script): add more detailed informationGias Kay Lee
Closes #5671 Closes #5676
2014-01-07refactor(booleanAttrs, ngSwitch): use link function instead of compile ↵Gias Kay Lee
function where appropriate Replace two compile functions that immediately return a post-link function with link function definitions instead. Closes #5664
2014-01-06refactor(input): wrapped validation logic in helper functionBen Wiklund
Closes #5643
2014-01-06docs(form): changed capitalization in CSS classes sectionjesse
In order to improve readability from "Is set" (confused on my screen as 'Ls set') updated the capitalization describing the setting of 4 CSS classes. Closes #5642
2014-01-03docs(ngRepeat): add info about aliasing special properties of ngRepeatWojciech Krzystek
This will safe peoples' time, since ngRepeat's docs, not ngInit's, is the first place where one would search for such info. Closes #5622
2014-01-02fix(ngRepeat): allow for more flexible coding style in ngRepeat expressionGias Kay Lee
With this change it's possible to split the ng-repeat expression into multiple lines at any point in the expression where white-space is expected. Closes #5537 Closes #5598
2013-12-31fix(input): use apply on change event only when one isn't already in progressIgor Minar
Closes #5293
2013-12-30fix(input): prevent double $digest when using jQuery trigger.Michał Gołębiowski
If an event was performed natively, jQuery sets the isTrigger property. When triggering event manually, the field is not present. Manually triggered events are performed synchronously which causes the "$digest already in progress" error. Closes #5293
2013-12-19docs(ngCloak): style name is ng-cloak, not ngCloaksnicolai
Closes #5374
2013-12-19docs(booleanAttrs): add @priority to all the boolean directivesMark Jones
Closes #5361
2013-12-19docs(ngEventDirs): adding quick examples for new eventsJames Watling
Closes #5338
2013-12-18docs(ngInit): fix typoJason Farnsworth
Closes #5343
2013-12-18fix(input): do not hold input for composition on androidChia-liang Kao
Workaround for chrome for android until #2129 is ready. Closes #5308, #5323
2013-12-17fix(select): invalidate when 'multiple`, `required` and model is `[]`Caitlin Potter
When `multiple` attribute is set on a `<select>` control and the model value is an empty array, we should invalidate the control. Previously, this directive was using incorrect logic for determining if the model was empty. Closes #5337
2013-12-17docs(ngIf): remove invalid comment from CSSPete Bacon Darwin
We cannot use valid /* ... */ CSS comments in examples because they break the parsing of the ngdoc comments. We can't use inline // comments because these are not valid in CSS. We could use the //!annotate extension to the ngdoc parser but this does not seem to be working. It is best to simply remove this line. Closes #5234
2013-12-16fix(ngRepeat): allow multiline expressionsRhys Brett-bowen
allow and pass through new line characters when checking passed in expression Closes #5000
2013-12-13perf(jqLite): implement and use the `empty` method in place of `html(‘’)`Michał Gołębiowski
jQuery's elem.html('') is way slower than elem.empty(). As clearing element contents happens quite often in certain scenarios, switching to using .empty() provides a significant performance boost when using Angular with jQuery. Closes #4457
2013-12-13perf(a): do not link when href or name exists in templateKarl Seamon
Change the a directive to link and hookup a click event only when there is no href or name in the template element. In a large Google app, this results in about 800 fewer registrations, saving a small but measurable amount of time and memory. Closes #5362
2013-12-12fix(ngInclude): Add template to DOM before linking other directivesTobias Bosch
The template needs to be added to the DOM before other directives at the same element as `ngInclude` are linked. Fixes #5247.
2013-12-12docs(ngSwitch): clarify that ngSwitch matches against string literalsPete Bacon Darwin
Closes #5285
2013-12-09docs(input): remove redundant closing span tagmiknsh5
Closes #5257
2013-12-05fix($compile): update cloned elements if the template arrives after the cloningTobias Bosch
If an element has a directive whose content is loaded using `templateUrl`, and the element is cloned using a linking function before the template arrives, the clone needs to be updated as well. This also updates `ngIf` and `ngRepeat` to keep the connection to the clone of a tranclude function, so that they know about the changes a directive with `templateUrl` does to the element in the future. Fixes to #4930.
2013-12-04fix(ngInit): evaluate ngInit before ngIncludeCaitlin Potter
The priority of ngInit is adjusted to occur before ngInclude, and after ngController. This enables ngInit to initiallize values in a controller's scope, and also to initiallize values before ngInclude executes. Closes #5167 Closes #5208
2013-12-04fix(input): ensure ngModelWatch() triggers second digest pass when appropriateDaniel Tabuenca
Due to an earlier change, ngModelWatch() no longer returns a value to the caller. This means the digest loop has no way to tell if the watch actually modified anything and so can not schedule another pass. This means any watches that watch form or model controller changes (e.g. watches on form.$valid) that are scheduled prior to an ngModelWatch() will not be able to see any changes made therin. This commit fixes this behavior by returning the latest evaluated ng-model value. Closes #5258 Closes #5282
2013-12-04docs(input): remove deprecated isolated scope pitfallJulien Bouquillon
The 1.2 release fixed the documented pitfall at 909cabd36d779598763cc358979ecd85bb40d4d7 by isolating only the isolated directive's scope. Closes #5179
2013-11-27docs(form): provide a list of Angular's built-in validation tokensBlaise Kal
As requested by a top-rated Disqus comment: http://docs.angularjs.org/api/ng.directive:form.FormController#comment-655325797 Closes #5121
2013-11-22fix(input): Support form auto complete on modern browserTobias Bosch
Although modern browser support the "input" event, they still only fire the "change" event when they auto complete form elements other than the currently selected one. Related to #1460
2013-11-21fix(ngInclude): Don't throw when the ngInclude element contains content with ↵Tobias Bosch
directives. Related to #5069
2013-11-21fix($compile): ensure CSS classes are added and removed only when necessaryMatias Niemelä
When $compile interpolates a CSS class attribute expression it will do so by comparing the CSS class value already present on the element. This may lead to unexpected results when dealing with ngClass values being added and removed therefore it is best that both compile and ngClass delegate addClass/removeClass operations to the same block of code.
2013-11-21fix(ngController): fix issue with ngInclude on the same elementAndrew Silluron-Gonzalez
This changes the priority of ngController to 500 so that it takes precedence over ngInclude. Closes #4431, #4521
2013-11-21feat(input): hold listener during text compositionChia-liang Kao
When composing text in CJKV, intermediate buffer for unfinished text should not be updating the bound scope variables. Closes #4684
2013-11-20fix(ngClass): ensure that ngClass only adds/removes the changed classesMatias Niemelä
ngClass works by removing all the former classes and then adding all the new classes to the element during each watch change operation. This may cause transition animations to never render. The ngClass directive will now only add and remove the classes that change during each watch operation. Closes #4960 Closes #4944
2013-11-20docs(booleanAtts): explain the motivation for boolean attributesgdennie
It was not explicitly and consistently stated that the transient nature of boolean attributes precludes them from hosting binding expressions. This change make that more clear and reinforces the simplicity and elegance of the solution. Closes #5031
2013-11-20docs(ngRepeat): fix typoStéphane Reynaud
Replace "ian" in "in" Closes #5027
2013-11-20docs(ngPluralize): Fix missing space before parenthesesStéphane Reynaud
There should be a space between "braces" and "(`{}`)" Closes #5026
2013-11-14fix($compile): accessing controllers of transcluded directives from childrenTobias Bosch
Additional API (backwards compatible) - Injects `$transclude` (see directive controllers) as 5th argument to directive link functions. - `$transclude` takes an optional scope as first parameter that overrides the bound scope. Deprecations: - `transclude` parameter of directive compile functions (use the new parameter for link functions instead). Refactorings: - Don't use comment node to temporarily store controllers - `ngIf`, `ngRepeat`, ... now all use `$transclude` Closes #4935.
2013-11-14docs(ngClass): fix e2e test for examplePete Bacon Darwin
Broken by fd7bca22e16b0ecbe1feaf49bab39d9a44b8df01