aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
AgeCommit message (Collapse)Author
2013-10-10docs(ngInit): add note on best practicesBrian Ford
2013-10-09feat(ngRepeat): use block separator commentsjankuca
Issue: multi-elements ng-repeat (ng-repeat-start, ng-repeat-end) can contain elements with a trancluding directive. This directive changes content of the row (template) and ng-repeat does not work correctly (when removing/moving rows), because ng-repeat works with the original template (elements). This changes ng-repeat behavior to traverse the DOM to find current elements everytime we are moving/removing rows (if the template has multiple elements). Closes #3104
2013-10-07fix(input): `false` is no longer an empty value by defaultPete Bacon Darwin
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes #3490, #3658, #2594
2013-10-07fix(*): protect calls to hasOwnProperty in public APIPeter Bacon Darwin
Objects received from outside AngularJS may have had their `hasOwnProperty` method overridden with something else. In cases where we can do this without incurring a performance penalty we call directly on Object.prototype.hasOwnProperty to ensure that we use the correct method. Also, we have some internal hash objects, where the keys for the map are provided from outside AngularJS. In such cases we either prevent `hasOwnProperty` from being used as a key or provide some other way of preventing our objects from having their `hasOwnProperty` overridden. BREAKING CHANGE: Inputs with name equal to "hasOwnProperty" are not allowed inside form or ngForm directives. Before, inputs whose name was "hasOwnProperty" were quietly ignored and not added to the scope. Now a badname exception is thrown. Using "hasOwnProperty" for an input name would be very unusual and bad practice. Either do not include such an input in a `form` or `ngForm` directive or change the name of the input. Closes #3331
2013-10-07style(select): fix semicolons and varsPeter Bacon Darwin
2013-10-07docs(ngModel): fix grammar and improve clarityDave Peticolas
Closes #4291
2013-10-07docs(ngValue): add docs for ngValue directiveBrian Ford
Closes #4267
2013-10-05docs(a): change model.$save() into something less deceptiveMichiel Staessen
Closes #4215
2013-10-05docs(ngList): improve grammar and clarityDave Peticolas
2013-10-03fix($compile): fix (reverse) directive postLink fn execution orderIgor Minar
previously the compile/link fns executed in this order controlled via priority: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityHigh, PostLinkPriorityMedium, PostLinkPriorityLow This was changed to: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityLow, PostLinkPriorityMedium , PostLinkPriorityHigh Using this order the child transclusion directive that gets replaced onto the current element get executed correctly (see issue #3558), and more generally, the order of execution of post linking function makes more sense. The incorrect order was an oversight that has gone unnoticed for many suns and moons. (FYI: postLink functions are the default linking functions) BREAKING CHANGE: the order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute. Very few directives in practice rely on order of postLinking function (unlike on the order of compile functions), so in the rare case of this change affecting an existing directive, it might be necessary to convert it to a preLinking function or give it negative priority (look at the diff of this commit to see how an internal attribute interpolation directive was adjusted). Closes #3558
2013-10-03docs(ngInclude): clarity, formattingDave Peticolas
Closes #4222
2013-10-03docs(ngClass): clarify the descriptionDave Peticolas
Closes #4220
2013-10-03docs(select): clarify usagegdennie
The wording seemed confusing and these adjustments seem to capture the intent with less turbulence. Closes #4257
2013-10-01refactor(select): simplify the ngOptions regular expressionStefan hr Berder
\w matches [a-zA-Z0-9_] and \d matches [0-9], using both in a character set is simply redundant. Closes #3903
2013-09-30fix(ngTransclude): detect ngTranslude usage without a transclusion directivejankuca
Closes #3759
2013-09-27docs(ngIf): formatting, clarityDave Peticolas
2013-09-27docs(ngController): fix grammarDave Peticolas
2013-09-27docs(ngCsp): fix grammarDave Peticolas
2013-09-27docs(dblClick): fix grammarDave Peticolas
2013-09-27docs(ngDisabled): clarifyDave Peticolas
2013-09-26feat(ngEventDirectives): add `ngCopy`, `ngCut`, and `ngPaste`Ben McCann
Closes #4172, #4170
2013-09-25docs(ngHref): fix formatting and clarifyDave Peticolas
Closes #4106
2013-09-25docs(ngShowHide): improve clarityDave Peticolas
Closes #4099
2013-09-25fix(ngRepeat): correctly track elements even when the collection is ↵jankuca
initially undefined Previously if the collection model was set to undefined on the first digest, the repeater would get confused and not use the correct tracking function for associating model with dom elements in the repeater. Closes #4145 Closes #3964
2013-09-20fix(ng-bind-html): watch string value instead of wrapperChirayu Krishnappa
Ref: https://github.com/angular/angular.js/pull/4045 I have this sinking feeling that support this use case sort of encourages binding to function that blindly trust some html. For now, I'm fixing the issue while I think about the use cases some more. In the case of a function that performs any non-trivial work before wrapping the value (e.g. the showdown filter in issue #3980, or the binding to a simply wrapper function in issue #3932 if it did anything meaty), this fix makes it "work" - but performance is going to suck - you should bind to some other thing on scope that watches the actual source and adjusts itself when that changes (e.g. the showdown filter.) For the case of the wrapper in #3932, if one isn't performing sanitization or some such thing - then you the developer has insight into why that value is safe in that particular context - and it should be available simply by name and not as a result of a function taking any arbitrary input to make auditing of security a little saner. Closes #3932, #3980
2013-09-20fix(ngInclude): don't break attribute bindings on ngInclude-ed elementBrian Ford
BREAKING CHANGE: ngInclude's priority is now set to 1000 It's quite rare for anyone to depend on explicity directive priority, but if a custom directive that needs to run before ngInclude exists, it should have its priority checked and adjusted if needed. Closes #3793
2013-09-20docs(ngClass): fix grammarDave Peticolas
Closes #4061
2013-09-20docs(ngCloak): fix grammar, clarityDave Peticolas
Closes #4076
2013-09-19docs(ngModelController): clarify issue with isolated scope directivePete Bacon Darwin
See #4043
2013-09-19docs(input): fix spelling error and reword for clarityts-web
2013-09-19docs(ngForm): fix grammar and improve explanationDave Peticolas
Closes #4050
2013-09-18docs(ngShowHide): fix typoRoberto Bonvallet
2013-09-17docs(input): clarify that `contenteditable` is an HTML5 attributeJames
Closes #3841
2013-09-16doc(api): fix grammar in a directive descriptionDave Peticolas
- Add missing words. - Simplify text.
2013-09-16docs(api): fix grammar in ngClick descriptionDave Peticolas
- Add missing word 'directive'. - Add missing word 'an'.
2013-09-13docs(ngSwitch): fix minor typoDaniel Tse
Closes #3993
2013-09-13docs(ngController): rephrased the description for clarityDean Sofer
2013-09-13fix(ngOptions): ignore object properties which start with $Gowtam Lal
2013-09-11docs(ngModel): provide link for best practices.Paxton Hare
Closes #3973
2013-09-11style(ngForm): simplify restrict difference between form and ngFormrodyhaddad
2013-09-11docs(ngChange): remove wrong @restrict and add missing @paramrodyhaddad
2013-09-11docs(ng.directives): add correct @restrict for all ng directivesrodyhaddad
2013-09-05docs(booleanAttrs): improve parameter docs for boolean attributesJames Daily
Closes #3724
2013-08-29perf(ngBindHtml): watch the original value and sanitize laterChirayu Krishnappa
2013-08-23fix($animate): skip ngAnimate animations if the provided element already has ↵Matias Niemelä
transitions/durations attached to it Closes #3587
2013-08-20fix(ngTransclude): clear the translusion point before transcludingIgor Minar
when the transluded content is being teleported to the translusion point, we should ensure that the translusion point is empty before appending otherwise we end up with junk before the transcluded content
2013-08-20fix(ngTransclude): make the transclusion available to parent post-linkIgor Minar
previously the translusion was appended the the ngTranslude element via $evalAsync which makes the transluded dom unavailable to parent post-linking functions. By appending translusion in linking phase, post-linking functions will be able to access it.
2013-08-19revert(ngInclude): remove ngInclude manual transclusion systemMatias Niemelä
2013-08-09fix(ngInclude): ensure ngInclude is terminal and uses its own manual ↵Matias Niemelä
transclusion system
2013-08-09docs(ngModel): validators should return undefined for invalid values.Niall Smart
Closes #3525