aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2013-10-03fix($compile): don't terminate compilation for regular transclusion directivesIgor Minar
Previously we would stop the compilation for both regular and element transclusion directives which was wrong. Only element transclusion directives should be terminal.
2013-10-03docs(angular.bind): clarify that bind is partial applicationJoe Hanink
The `angular.bind` function reflects the definition of "partial application", which reduces a function's arity rather than transforming a function with n args into a chain of n functions, each having a single arg. curry : f(x,y,z) -> f(x)(y)(z) partial application : f(x,y,z) -> f(x)(y,z) Closes #4239
2013-10-03docs($sce): fix punctuationSimeon Willbanks
Closes #4235
2013-10-03docs(rootScope): improve grammar and clarityDave Peticolas
Closes #4234
2013-10-03docs(ngInclude): clarity, formattingDave Peticolas
Closes #4222
2013-10-03docs(ngClass): clarify the descriptionDave Peticolas
Closes #4220
2013-10-03docs($compile): fix param description being displayed as code blockbasarat
Closes #4187
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-03fix($sanitize): sanitize DOCTYPE declarations correctlypaolo-delmundo
HTML to be sanitized that contains a DOCTYPE declaration were causing the HTML parser to throw an error. Now the parser correctly removes the declarations when sanitizing HTML. Closes #3931
2013-10-02fix($resource): pass transformed value to both callbacks and promisesjankuca
Closes #3817
2013-10-02fix(isArrayLike): correctly handle string primitivesDaniel Luz
Closes #3356
2013-10-02feat(ngMock.$timeout): remove flushNext methodVojta Jina
2013-10-02fix($location): prevent infinite digest error in IE7Angel Balcarcel
Refactored `replacedUrl` to store the new URL on both `location.replace` and setting `location.href` directly to handle delays in the actual location value change in IE. Closes #2802
2013-10-02fix($scope): $evalAsync executes on the right scopeLucas Galfasó
Executes $evalAsync at the scope that the call was made Closes: #3548
2013-10-02docs($compile): improve explanation of Attributes.$observeBuu Nguyen
The current comment of Attributes.$observe doesn't state correctly the behavior when the attribute contains no interpolation. Specifically, it states that the observer function will never be invoked if the attribute contains no interpolation. However, the actual behavior in this case is that the observer will be invoked once during the next digest loop.
2013-10-02fix($compile): ng-attr to support dash separated attribute namesJamie Mason
2013-10-01feat($compile): support tel: links in a[href]Ben McCann
Allow `tel:` links so that click-to-call works in mobile browsers
2013-10-01fix($compile): allow interpolations for non-event handlers attrsFrancesco Pontillo
Fix wrong behaviour that didn't allow 'data-on' and 'on' element attributes to be interpolated by $compile. The regex now accepts any string beginning with 'on' and with at least one more English letter.
2013-10-01docs(ngRoute): add angularEvent param to $routeChangeStart eventMatthew Kleiman
Adds missing implied first argument, `angularEvent`, to match the rest of the `$routeChange` event documentation.
2013-10-01fix($httpBackend): set headers with falsy valuesRicardo Bin
This is a breaking change. To migrate to the new behavior, delete or set headers to `undefined` to avoid having them sent. To restore the old behavior, override `$httpBackendProvider` with the old implementation. Closes #2984
2013-10-01fix($animator): avoid completing the animation asynchronously unless CSS ↵Matias Niemelä
transtiions/animations are present Closes #4023 Closes #3940
2013-10-01fix($httpBackend): don't send empty string bodiesJames Roper
The `XMLHttpRequest.send` spec defines different semantics for `null` than for an empty String: an empty String should be sent with a `Content-Type` of `text/plain`, whereas `null` should have no `Content-Type` header set. Closes #2149
2013-10-01chore: remove Firefox CORS workaroundjquadrin
See #1468
2013-10-01fix(dateFilter): allow negative millisecond value stringsHenning Teek
2013-10-01refactor($ngAnimate): simplify the animation event rewriteMichał Gołębiowski
To avoid code duplication, use single variables for keeping properties/events names to use. Also, fix some errors that have happened after the rewrite from moment ago.
2013-10-01feat(filter): allow map of filters to be registeredColin Casey
This feature adds similar functionality to what `$ControllerProvider.register` and `$CompileProvider.directive` currently provide by allowing a map of filter name/factories to be passed as the sole argument to `$FilterProvider.register` to register all of the specified filters. Closes #4036 Closes #4091
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-10-01feat($sce): simpler patterns for $sceDelegateProviders white/blacklistsChirayu Krishnappa
Closes #4006
2013-09-30docs($injector): Reword `fn` param docs and link to DI informationCaitlin Potter
2013-09-30fix(ngTransclude): detect ngTranslude usage without a transclusion directivejankuca
Closes #3759
2013-09-30fix($compile): link parents before traversingVojta Jina
How did compiling a templateUrl (async) directive with `replace:true` work before this commit? 1/ apply all directives with higher priority than the templateUrl directive 2/ partially apply the templateUrl directive (create `beforeTemplateNodeLinkFn`) 3/ fetch the template 4/ apply second part of the templateUrl directive on the fetched template (`afterTemplateNodeLinkFn`) That is, the templateUrl directive is basically split into two parts (two `nodeLinkFn` functions), which has to be both applied. Normally we compose linking functions (`nodeLinkFn`) using continuation - calling the linking function of a parent element, passing the linking function of the child elements as an argument. The parent linking function then does: 1/ execute its pre-link functions 2/ call the child elements linking function (traverse) 3/ execute its post-link functions Now, we have two linking functions for the same DOM element level (because the templateUrl directive has been split). There has been multiple issues because of the order of these two linking functions (creating controller before setting up scope locals, running linking functions before instantiating controller, etc.). It is easy to fix one use case, but it breaks some other use case. It is hard to decide what is the "correct" order of these two linking functions as they are essentially on the same level. Running them side-by-side screws up pre/post linking functions for the high priority directives (those executed before the templateUrl directive). It runs post-linking functions before traversing: ```js beforeTemplateNodeLinkFn(null); // do not travers afterTemplateNodeLinkFn(afterTemplateChildLinkFn); ``` Composing them (in any order) screws up the order of post-linking functions. We could fix this by having post-linking functions to execute in reverse order (from the lowest priority to the highest) which might actually make a sense. **My solution is to remove this splitting.** This commit removes the `beforeTemplateNodeLinkFn`. The first run (before we have the template) only schedules fetching the template. The rest (creating scope locals, instantiating a controller, linking functions, etc) is done when processing the directive again (in the context of the already fetched template; this is the cloned `derivedSyncDirective`). We still need to pass-through the linking functions of the higher priority directives (those executed before the templateUrl directive), that's why I added `preLinkFns` and `postLinkFns` arguments to `applyDirectivesToNode`. This also changes the "$compile transclude should make the result of a transclusion available to the parent directive in post- linking phase (templateUrl)" unit test. It was testing that a parent directive can see the content of transclusion in its pre-link function. That is IMHO wrong (as the `ngTransclude` directive inserts the translusion in its linking function). This test was only passing because of c173ca412878d537b18df01f39e400ea48a4b398, which changed the behavior of the compiler to traverse before executing the parent linking function. That was wrong and also caused the #3792 issue, which this change fixes. Closes #3792 Closes #3923 Closes #3935 Closes #3927
2013-09-30docs(angular.copy): add an example with the two possible argumentsUri Goldshtein
Closes #4179
2013-09-30docs($route): reloadOnSearch affects hash fragment changesFred Sauer
reloadOnSearch also affects reloads due to $location.hash() changes
2013-09-30docs($http): update grammar in commentsMartin Cortez
Closes #4186
2013-09-30fix($location): re-assign location after BFCache backJeff Cross
In the Android browser, the BFCache maintains the state of JavaScript applications even when navigating to another app, so that going forward and back, to and from an application is very fast. Unfortunately, this can have undesired side effects. In this instance, the location variable was holding a reference to a stale window.location, and was throwing errors when going back to an Angular app after browsing to another site. This fix makes sure that location.url() includes a check to make sure that location is referencing the current window.location. Closes #4044
2013-09-30fix($animate): ensure transition-property is not changed when only keyframe ↵Matias Niemelä
animations are in use Closes #3933
2013-09-28docs(mocks): fix syntax error in exampleRob Culliton
Closes #4183
2013-09-28docs($timeout): add a $timeout exampleUri Goldshtein
The original example is by gxlcl. Closes #4180
2013-09-27fix(log): prevent logging `undefined` for $log in IEColin Casey
Closes #1705
2013-09-27docs(angular.Module): fix controller and directive method parametersDavid Bennett
2013-09-27docs(ngIf): formatting, clarityDave Peticolas
2013-09-27style($rootScope): fix argument name in $postDigest apiIgor Minar
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-27style($compile): remove unused variableIgor Minar
2013-09-27fix(jqLite): use get/setAttribute so that jqLite works on SVG nodesBrian Ford
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( The JqLiteAddClass/JQLiteRemoveClass methods are now also used directly by $animate to work around the jQuery not being able to handle class modifications on SVG elements. Closes #3858
2013-09-26fix($compile): collect ranges on multiple directives on one elementjankuca
The problem was in keeping the values of `attrNameStart` and `attrNameEnd` between directive loop iterations which lead to the compiler looking for multi-element ranges for any directives that happened to be in the directive list after one that was applied on a range. For instance, having a ng-repeat-start and ng-class on a single element with ng-repeat being resolved first made the compiler look for an ng-repeat-end for both ng-repeat and ng-class because the `attrNameEnd` was not reset to a falsy value before the second iteration. As the result, an exception saying the block end element could not be found and the second directive was not actually applied. Closes #4002
2013-09-26feat(ngEventDirectives): add `ngCopy`, `ngCut`, and `ngPaste`Ben McCann
Closes #4172, #4170