aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2013-03-05chore(Grunt): switch from Rake to GruntDave Geddes
Migrates the Angular project from Rake to Grunt. Benefits: - Drops Ruby dependency - Lowers barrier to entry for contributions from JavaScript ninjas - Simplifies the Angular project setup and build process - Adopts industry-standard tools specific to JavaScript projects - Support building angular.js on Windows platform (really?!? why?!?) BREAKING CHANGE: Rake is completely replaced by Grunt. Below are the deprecated Rake tasks and their Grunt equivalents: rake --> grunt rake package --> grunt package rake init --> N/A rake clean --> grunt clean rake concat_scenario --> grunt build:scenario rake concat --> grunt build rake concat_scenario --> grunt build:scenario rake minify --> grunt minify rake version --> grunt write:version rake docs --> grunt docs rake webserver --> grunt webserver rake test --> grunt test rake test:unit --> grunt test:unit rake test:<jqlite|jquery|modules|e2e> --> grunt test:<jqlite|jquery|modules|end2end|e2e> rake test[Firefox+Safari] --> grunt test --browsers Firefox,Safari rake test[Safari] --> grunt test --browsers Safari rake autotest --> grunt autotest NOTES: * For convenience grunt test:e2e starts a webserver for you, while grunt test:end2end doesn't. Use grunt test:end2end if you already have the webserver running. * Removes duplicate entry for Describe.js in the angularScenario section of angularFiles.js * Updates docs/src/gen-docs.js to use #done intead of the deprecated #end * Uses grunt-contrib-connect instead of lib/nodeserver (removed) * Removes nodeserver.sh, travis now uses grunt webserver * Built and minified files are identical to Rake's output, with the exception of one less character for git revisions (using --short) and a couple minor whitespace differences Closes #199
2013-02-28feat($compile): allow directives to modify interpolated attributesThibault Leruitte
A directive can now set/update/remove attribute values even those containing interpolation during the compile phase and have the new value be picked up during the compilation. For example in template: <div replace-directive some-attr-or-directive="{{originalInterpolationValue}}"></div> the replace-directive can now replace the value of some-attr-or-directive during compilation which produces this intermitent template: <div replace-directive some-attr-or-directive="{{replacedInterpolationValue}}"></div> or even <div replace-directive some-attr-or-directive="replacedStaticValue"></div> as well as <div replace-directive some-attr-or-directive></div>
2013-02-27feat($compile): support for dynamic template generationLuis Ramón López
`template` and `templateUrl` properties can now be optionally defined via a function. This allows templates to be dynamically generated on the fly.
2013-02-27feat($route): add `caseInsensitiveMatch` option for url matchingDavid Chang
with this property urls can be matched case-insensitively which enables some new use cases.
2013-02-27feat($resource): ability to override url in resource actionszeflasher
Resources now can defined per action url override. The url is treated as a template rather than a literal string, so fancy interpolations are possible. See attached tests for example usage.
2013-02-27feat($compile): add attribute binding support via ngAttr*Luis Ramón López
Sometimes is not desirable to use interpolation on attributes because the user agent parses them before the interpolation takes place. I.e: <svg> <circle cx="{{cx}}" cy="{{cy}}" r="{{r}}"></circle> </svg> The snippet throws three browser errors, one for each attribute. For some attributes, AngularJS fixes that behaviour introducing special directives like ng-href or ng-src. This commit is a more general solution that allows prefixing any attribute with "ng-attr-", "ng:attr:" or "ng_attr_" so it will be set only when the binding is done. The prefix is then removed. Example usage: <svg> <circle ng-attr-cx="{{cx}}" ng-attr-cy="{{cy}}" ng:attr-r="{{r}}"></circle> </svg> Closes #1050 Closes #1925
2013-02-26fix($http): don't encode URL query substring "null" to "+"Andrew McLeod
Fixes issue in encodeUriQuery used by $http and $resource that treats null as a string and replaces the characters "null" with "+".
2013-02-25docs(ngMock): fix minor typo in commentMatt Ginzton
Change "constroctor" to "constructor".
2013-02-25docs(ngMock): remove Jasmine-only comments now that Mocha worksMatt Ginzton
Remove comments about angular.mock.inject and angular.mock.module being available for jasmine only. Since 1.1.1 the intent is that they be available for mocha as well; now they even work!
2013-02-25fix(ngMock): fix isSpecRunning to work for MochaMatt Ginzton
When running inside Mocha, don't look in Jasmine's spec.queue.running. It's not there. This is documented as issue #1467; I think this issue was also responsible for #1589 and recent complaints in #1253. Closes #1467.
2013-02-25fix($compile): compile replace directives in external templatedanilsomsikov
Passing DOMNode#childNodes to compileNodes when compiling remote template, so that directives with replace:true can be compiled. The previous version used jqLite#contents which returned collection that was not updated during the compilation. Closes #1859
2013-02-25feat(JQLite): ready() now supports document.readyState=='complete'Jørgen Borgesen
JQLite.ready() used for automatic bootstrapping (when jQuery is not present) now checks if document already is ready when first called. This simplifies bootstrapping when the angular script is loaded asynchronously. However if other scripts with angular app code are being loaded as well it is developers responsibility to ensure that these scripts are loaded after angular-loader.js is evaluated and before angular.js script is evaluated.
2013-02-25feat($compile): '=?' makes '=' binding optionalLuis Ramón López
If you bind using '=' to a non-existant parent property, the compiler will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception, which is right because the model doesn't exist. This enhancement allow to specify that a binding is optional so it won't complain if the parent property is not defined. In order to mantain backward compability, the new behaviour must be specified using '=?' instead of '='. The local property will be undefined is these cases. Closes #909 Closes #1435
2013-02-25docs(dateFilter): properly specify range for the Z format modifierPawel Kozlowski
Closes #1533
2013-02-25refactor($route): use $q#all hash signature 2 simplify 'resolve' implAlexander Shtuchkin
2013-02-25feat($q): $q.all() now accepts hashAlexander Shtuchkin
When waiting for several promises at once, it is often desirable to have them by name, not just by index in array. Example of this kind of interface already implemented would be a $routeProvider.when(url, {resolve: <hash of promises>}), where resources/promises are given by names, and then results accessed by names in controller.
2013-02-25fix($compile): whitelist file:// in url sanitizationIgor Minar
2013-02-23fix($compile): handle elements with no childNodes propertyIgor Minar
see the test for more details
2013-02-23fix($httpBackend): prevent DOM err due to dereferencing .responseTextIgor Minar
If responseType is defined and the request fails for one reason or another the .response property returned falsy value which caused dereferencing of .responseText. If the responseType was a blob or document then an error was thrown. To prevent this, I'm checking for responseType first and based on that dereferencing .response or .responseText. We need to keep on checking .responseText because that's the original XHR response api that is still needed for IE8 and 9. Closes #1922
2013-02-20fix($compile): sanitize values bound to a[href]Igor Minar
2013-02-18fix(ngClass): keep track of old ngClass value manuallyPer Rovegård
ngClassWatchAction, when called as a $watch function, gets the wrong old value after it has been invoked previously due to observation of the interpolated class attribute. As a result it doesn't remove classes properly. Keeping track of the old value manually seems to fix this. Closes #1637
2013-02-18fix(compile): should not leak memory when there are top level empty text nodesPete Bacon Darwin
The change to prevent <span> elements being wrapped around empty text nodes caused these empty text nodes to have scopes and controllers attached, through jqLite.data() calls, which led to memory leaks and errors in IE8. Now we exclude all but document nodes and elements from having jqLite.data() set both in the compiler and in ng-view. Fixes: #1968 and #1876
2013-02-14feat(routeProvider): Add support to catch-all parameters in routesLuis Ramón López
This allows routeProvider to accept parameters that matches substrings even when they contain slashes if they are prefixed with an asterisk instead of a colon. For example, routes like edit/color/:color/largecode/*largecode will match with something like this http://appdomain.com/edit/color/brown/largecode/code/with/slashs.
2013-02-14fix(compile): Initialize interpolated attributes before directive linkingPete Bacon Darwin
2013-02-14fix(compile): Interpolate @ locals before the link function runsPete Bacon Darwin
Do a one-off interpolation of @ locals to ensure that the link fn receives attributes that are already interpolated.
2013-02-14feat(ngSwitch): support multiple matches on ngSwitchWhen and ngSwitchDefaultLucas Galfasó
Closes #1074
2013-02-14fix($httpBackend): patch for Firefox bug w/ CORS and response headersWill Moore
A workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=608735 In FF getAllResponseHeaders() returns null if the request is the result of CORS. Tried to format the code so that when a FF patch is released and gains enough traction it can easily be selected and deleted. Heavily inspired by jQuery's patch for the same bug. This patch falls short of passing through custom headers but covers all of the "simple response headers" in the spec at http://www.w3.org/TR/cors/ This commit should get reverted once Firefox 21 gets out. Closes #1468
2013-02-14fix(a): workaround IE bug affecting mailto urlsIgor Minar
Apparently there is a really weird bug in IE6-8 that causes anchor textContent to be reset with href content when both contain @ symbol. Inserting a bogus comment node into all anchor elements in IE works around this browser bug. I'm fixing the issue via directive because that way we'll fix it for jQuery as well. I fixed an e2e test too because it was incorrect. Closes #1949
2013-02-14style(filter): remove wsIgor Minar
2013-02-14fix(*): don't use instanceof to detect arraysIgor Minar
this breaks when multiple javascript contexts are involved - like in node-webkit see original PR: #1966 Closes #1966
2013-02-14docs($resource): fix bad indentation producing a code blockCedric Soulas
2013-02-14docs($rootScope): rearrange event listener docsEwen Cumming
2013-02-14fix(ngSwitch): make ngSwitch compatible with controller BC moduledeboer
add a $scope to the ngSwitch's controller to fool the controller BC (backwards compatibility) module used by DFA.
2013-02-14docs($q): fix a few typosVineet Kumar
2013-02-14fix($http): do not encode special characters `@$:,` in paramsVojta Jina
encodeURIComponent is too aggressive and doesn't follow http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path segments so we need this test to make sure that we don't over-encode the params and break stuff like buzz api which uses @self. This is has already been fixed in `$resource`. This commit fixes it in a same way for `$http` as well. BREAKING CHANGE: $http does follow RFC3986 and does not encode special characters like `$@,:` in params. If your application needs to encode these characters, encode them manually, before sending the request.
2013-02-14fix($resource): params should expand array values properlyMark Nadig
Today, calling e.g. var R = $resource('/Path/:a'); R.get({a: 'foo', bar: ['baz1', 'baz2']}); results in a query string like "/Path/doh?bar=baz1,baz2" which is undesirable. This commit enhances resource to use $http to encode any non-url parameters resulting in a query string like "/Path/doh?bar=baz1&bar=baz2". BREAKING CHANGE: if the server relied on the buggy behavior then either the backend should be fixed or a simple serialization of the array should be done on the client before calling the resource service.
2013-02-14feat(scope): only evaluate constant $watch expressions onceDaniel Luz
2013-02-14feat($parse): added `constant` and `literal` propertiesDaniel Luz
* `literal` is set to true if the expression's top-level is a JavaScript literal (number, string, boolean, null/undefined, array, object), even if it contains non-literals inside. * `constant` is set to true if the expression is known to be made entirely of constant values, i.e., evaluating it will always yield the same result. A consequence is that a JSON expression is guaranteed to be both literal and constant.
2013-02-14docs($parse): document function argument types, fix minor typoDaniel Luz
2013-02-14fix($rootScope): minor typo fixesDaniel Luz
2013-02-14feat(noConflict): restore previous angular namespace referenceJames Morrin
2013-02-14fix(resource): Update RegExp to allow urlParams with out leading slashFredrik Bonander
Will allow reoucese to be loaded from a relative path Example: var R = $resource(':path'); R.get({ path : 'data.json' }); Example usage: Load resources in applications not using webserver, ie local webapp in on a tablet.
2013-02-14fix(compiler): Allow startingTag method to handle text / comment nodesShyam Seshadri
2013-02-14feat(filter): Add comparison function to filterRosina Bignall
Add optional comparator function argument to $filter('filter')(array, expression, comparator) such that the comparator function is used to compare the values and predicates. When true, defaults to equality. When missing defaults to substring matching.
2013-02-14fix(numberFilter): fix formatting when "0" passed as fractionSizeKury Kruitbosch
When checking to add decimal and trialing 0s number filter used to check trueness of fractionSize. "0" evaluating to true causes "123" to return "123."
2013-02-14docs($resource): fix missing punctuationCedric Soulas
2013-02-11feat($resource): expose promise based api via $then and $resolvedIgor Minar
Expose $then and $resolved properties on resource action return values which allow checking if a promise has been resolved already as well as registering listeners at any time of the resource object life-cycle. This commit replaces unreleased commit f3bff27460afb3be208a05959d5b84233d34b7eb which exposed unintuitive $q api instead and didn't expose important stuff like http headers.
2013-02-11revert: refactor(angular.copy): use slice(0) to clone arraysIgor Minar
This reverts commit 28273b7f1ef52e46d5bc23c41bc7a1492cf23014o. slice(0) doesn't perform deep copy of the array so its unsuitable for our purposes.
2013-02-11refactor(angular.copy): use array.length=0 to empty arraysIgor Minar
2013-02-11refactor(angular.copy): use slice(0) to clone arraysIgor Minar
slice(0) is way faster on most browsers