Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00456a8f93 | |||
| 0b3022e8e0 | |||
| 456026eff1 | |||
| 8ec3efd967 | |||
| 8528781f85 | |||
| 98f603722d | |||
| ebece0bcb9 | |||
| 4b7398eeca | |||
| 4e79decc30 | |||
| 888b0f5400 | |||
| aaf9c5e598 | |||
| 893d2f8000 | |||
| effc98fdc9 | |||
| 64cdbf3ae9 | |||
| 5bba892ffd | |||
| ec27deacfd | |||
| c6e4defcb6 | |||
| 74a7afcb31 | |||
| 08cc6edd38 | |||
| 4f3870500d | |||
| cd0507bc3a | |||
| 20eef05195 | |||
| a6d7b4bdbd | |||
| 5811c5c35b | |||
| e37e30e93f | |||
| a0b8ab8d7d | |||
| 129c53730c | |||
| 8695138aec | |||
| ed56872bb2 | |||
| cb183433a0 | |||
| 631fbda6a9 | |||
| 4c33b56612 |
+423
@@ -1,3 +1,426 @@
|
||||
<a name="1.2.23"></a>
|
||||
# 1.2.23 superficial-malady (2014-08-22)
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **$location:**
|
||||
- rewrite relative URI correctly if `path==='/'` in legacy html5Mode
|
||||
([c6e4defc](https://github.com/angular/angular.js/commit/c6e4defcb6ec1ff43e9590b8fe9601d9e9da445d),
|
||||
[#8684](https://github.com/angular/angular.js/issues/8684))
|
||||
- don't call `indexOf()` of undefined `href` attribute
|
||||
([74a7afcb](https://github.com/angular/angular.js/commit/74a7afcb31b2e2aef2d7a4c3e3cf29f320669b0e),
|
||||
[#7721](https://github.com/angular/angular.js/issues/7721), [#8681](https://github.com/angular/angular.js/issues/8681))
|
||||
- **$sanitize:** sanitize javascript urls with comments
|
||||
([4f387050](https://github.com/angular/angular.js/commit/4f3870500da6f6f0c1b1d20c70404996b1a39585),
|
||||
[#8274](https://github.com/angular/angular.js/issues/8274))
|
||||
- **Angular:** make Date comparison in equals() NaN-aware
|
||||
([98f60372](https://github.com/angular/angular.js/commit/98f603722d81046031ad4a10e0a49b692871c2b2),
|
||||
[#8650](https://github.com/angular/angular.js/issues/8650), [#8715](https://github.com/angular/angular.js/issues/8715))
|
||||
- **copy:** clear array destinations correctly for non-array sources
|
||||
([888b0f54](https://github.com/angular/angular.js/commit/888b0f5400c2357dcc91300d1a4e66e52a8d8801),
|
||||
[#8610](https://github.com/angular/angular.js/issues/8610), [#8702](https://github.com/angular/angular.js/issues/8702))
|
||||
- **input:**
|
||||
- use lowercase method to account for undefined type
|
||||
([456026ef](https://github.com/angular/angular.js/commit/456026eff12ad70fa27dd08ec6bddc63e0f3e604))
|
||||
- by default, do not trim `input[type=password]` values
|
||||
([ebece0bc](https://github.com/angular/angular.js/commit/ebece0bcb9d64e59beb1c9b3418bed25e50ceef4),
|
||||
[#8250](https://github.com/angular/angular.js/issues/8250), [#8230](https://github.com/angular/angular.js/issues/8230))
|
||||
- **linky:** handle quotes around email addresses
|
||||
([effc98fd](https://github.com/angular/angular.js/commit/effc98fdc91937ae0aca30bc53e34a3c29863cd6),
|
||||
[#8520](https://github.com/angular/angular.js/issues/8520))
|
||||
- **minErr:** encode btstrpd error input to strip angle brackets
|
||||
([aaf9c5e5](https://github.com/angular/angular.js/commit/aaf9c5e598996ab17bce9579c8bfe63628b6620e),
|
||||
[#8683](https://github.com/angular/angular.js/issues/8683))
|
||||
- **ngHref:** remove attribute when empty value instead of ignoring
|
||||
([ed56872b](https://github.com/angular/angular.js/commit/ed56872bb2c9c479f90a479f52e3d4ef9c80d0c7),
|
||||
[#2755](https://github.com/angular/angular.js/issues/2755))
|
||||
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
- **input:** due to [ebece0bc](https://github.com/angular/angular.js/commit/ebece0bcb9d64e59beb1c9b3418bed25e50ceef4),
|
||||
|
||||
Previously, `input[type=password]` would trim values by default, and would require an explicit ng-trim="false"
|
||||
to disable the trimming behaviour. After this CL, `ng-trim` no longer affects `input[type=password]`, and will
|
||||
never trim the password value.
|
||||
|
||||
Closes #8250
|
||||
Closes #8230
|
||||
|
||||
|
||||
|
||||
<a name="1.3.0-beta.19"></a>
|
||||
# 1.3.0-beta.19 rafter-ascension (2014-08-22)
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **$compile:**
|
||||
- use the correct namespace for transcluded SVG elements
|
||||
([ffbd276d](https://github.com/angular/angular.js/commit/ffbd276d6def6ff35bfdb30553346e985f4a0de6),
|
||||
[#8716](https://github.com/angular/angular.js/issues/8716))
|
||||
- update the jQuery `.context` when an element is replaced by `replace:true` directive
|
||||
([f02f7d9c](https://github.com/angular/angular.js/commit/f02f7d9c15deea9c5d83212301e2a5e18223bbe5),
|
||||
[#8253](https://github.com/angular/angular.js/issues/8253), [#7900](https://github.com/angular/angular.js/issues/7900))
|
||||
- **$location:**
|
||||
- rewrite relative URI correctly if `path==='/'` in legacy html5Mode
|
||||
([d18b2819](https://github.com/angular/angular.js/commit/d18b2819768e467897dee7bc223876ca23ea71b1),
|
||||
[#8684](https://github.com/angular/angular.js/issues/8684))
|
||||
- don't call `indexOf()` of undefined `href` attribute
|
||||
([5b77e30c](https://github.com/angular/angular.js/commit/5b77e30c1ac49be7b079b82527a5631f68bac904),
|
||||
[#7721](https://github.com/angular/angular.js/issues/7721), [#8681](https://github.com/angular/angular.js/issues/8681))
|
||||
- **$parse:** remove unused variable declaration in generated getters
|
||||
([6acea115](https://github.com/angular/angular.js/commit/6acea1152f72a4026583897c67bea2839bc9e89e))
|
||||
- **$sanitize:** sanitize javascript urls with comments
|
||||
([b7e82a33](https://github.com/angular/angular.js/commit/b7e82a33eee03fc683f982c6ee13d15d88b07f67),
|
||||
[#8274](https://github.com/angular/angular.js/issues/8274))
|
||||
- **$watchGroup:** call listener once when the `watchExpressions` array is empty
|
||||
([bf0e8373](https://github.com/angular/angular.js/commit/bf0e83732aa02c7aa08d0ccdf122116235fcfa11))
|
||||
- **Angular:** make Date comparison in `equals()` `NaN`-aware
|
||||
([693e846a](https://github.com/angular/angular.js/commit/693e846add5089d0e516604ae4a109e445fd3664),
|
||||
[#8650](https://github.com/angular/angular.js/issues/8650), [#8715](https://github.com/angular/angular.js/issues/8715))
|
||||
- **Scope:** don't clear the phase when an exception is thrown from asyncQueue or watch
|
||||
([bf1a57ad](https://github.com/angular/angular.js/commit/bf1a57ad4822bb152fdd4d2fb54c0689e466481b))
|
||||
- **copy:** clear array destinations correctly for non-array sources
|
||||
([a603e202](https://github.com/angular/angular.js/commit/a603e202cc7e048c2ab6f12dee1cc8f277cf6f4f),
|
||||
[#8610](https://github.com/angular/angular.js/issues/8610), [#8702](https://github.com/angular/angular.js/issues/8702))
|
||||
- **forEach:** match behaviour of Array.prototype.forEach (ignore missing properties)
|
||||
([36230194](https://github.com/angular/angular.js/commit/36230194be8aa417b0af33d618060829a75c4c5f),
|
||||
[#8510](https://github.com/angular/angular.js/issues/8510), [#8522](https://github.com/angular/angular.js/issues/8522), [#8525](https://github.com/angular/angular.js/issues/8525))
|
||||
- **input:**
|
||||
- use lowercase method to account for undefined type
|
||||
([066c0499](https://github.com/angular/angular.js/commit/066c049957a8af2fe449040eca2f1cb499655e32))
|
||||
- by default, do not trim input[type=password] values
|
||||
([a7fb357f](https://github.com/angular/angular.js/commit/a7fb357fa122e0a056ce1de838a2dfaf1ebc2953),
|
||||
[#8250](https://github.com/angular/angular.js/issues/8250), [#8230](https://github.com/angular/angular.js/issues/8230))
|
||||
- **jQuery:** cooperate with other libraries monkey-patching jQuery.cleanData
|
||||
([b9389b26](https://github.com/angular/angular.js/commit/b9389b26ba2cf6aa70372fa32a7b28c62d174bf5),
|
||||
[#8471](https://github.com/angular/angular.js/issues/8471))
|
||||
- **jqLite:**
|
||||
- clone wrapNode in jqlite/wrap
|
||||
([77d3e754](https://github.com/angular/angular.js/commit/77d3e7544642396d868aa49b85f0c027e8057bd7),
|
||||
[#3860](https://github.com/angular/angular.js/issues/3860), [#4194](https://github.com/angular/angular.js/issues/4194))
|
||||
- revert the `ready()` optimization until jQuery does the same
|
||||
([1bdca93d](https://github.com/angular/angular.js/commit/1bdca93d708ce9441b26d00e564210755395edf7))
|
||||
- **linky:** handle quotes around email addresses
|
||||
([a9d22712](https://github.com/angular/angular.js/commit/a9d227120dc2d433372da415a450e56b783b57a0),
|
||||
[#8520](https://github.com/angular/angular.js/issues/8520))
|
||||
- **minErr:** encode btstrpd error input to strip angle brackets
|
||||
([0872388a](https://github.com/angular/angular.js/commit/0872388a1b88b8637fdb0fb1ebbee269bead0508),
|
||||
[#8683](https://github.com/angular/angular.js/issues/8683))
|
||||
- **ngRepeat:**
|
||||
- allow aliasAs identifiers which contain but do not match reserved words
|
||||
([d713ad1b](https://github.com/angular/angular.js/commit/d713ad1b6607389649fbb8d12ac103565b02a1d4),
|
||||
[#8729](https://github.com/angular/angular.js/issues/8729))
|
||||
- make allowed aliasAs expressions more strict
|
||||
([09b29870](https://github.com/angular/angular.js/commit/09b298705f74255aff55bb7e4ba200c4200d712d),
|
||||
[#8438](https://github.com/angular/angular.js/issues/8438), [#8440](https://github.com/angular/angular.js/issues/8440))
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- **$compile:**
|
||||
- use allOrNothing interpolation for ngAttr*
|
||||
([09de7b5d](https://github.com/angular/angular.js/commit/09de7b5db466498becb295ecf5c1d0a698b1512c),
|
||||
[#8376](https://github.com/angular/angular.js/issues/8376), [#8399](https://github.com/angular/angular.js/issues/8399))
|
||||
- **benchpress:** configure benchpress grunt task
|
||||
([6bdaa4bc](https://github.com/angular/angular.js/commit/6bdaa4bc213805a58f51e9f5285dfe03bb06ddc3))
|
||||
- **jqLite:** implement the `detach` method
|
||||
([1a05daf5](https://github.com/angular/angular.js/commit/1a05daf5dc67813528afdb88086766dc22b6c0df),
|
||||
[#5461](https://github.com/angular/angular.js/issues/5461))
|
||||
- **ngRoute:** add method for changing url params
|
||||
([77a1acc7](https://github.com/angular/angular.js/commit/77a1acc7fcad7a8a7d0376b33d38a8977372cfe2))
|
||||
|
||||
|
||||
## Performance Improvements
|
||||
|
||||
- **$compile:**
|
||||
- don't register $destroy callbacks on element-transcluded nodes
|
||||
([b5f7970b](https://github.com/angular/angular.js/commit/b5f7970be5950580bde4de0002a578daf3ae3aac))
|
||||
- refactor publicLinkFn to simplify the code and use 'for in' loop
|
||||
([645625cf](https://github.com/angular/angular.js/commit/645625cf349a4be57691a7bf418b2386b4c1a53d))
|
||||
- clone the nodeList during linking only if necessary
|
||||
([3e0a2e1f](https://github.com/angular/angular.js/commit/3e0a2e1f3367a5b4ae7d8de6cff559f522aacfba))
|
||||
- delay object initialization in nodeLinkFn
|
||||
([31ed0af7](https://github.com/angular/angular.js/commit/31ed0af74b0081906415dcefe5610e1217cc0c48))
|
||||
- optimize nodeLinkFn
|
||||
([35134a0e](https://github.com/angular/angular.js/commit/35134a0e237d193cd7d3995dacfdc6bf3e92635e))
|
||||
- optimize publicLinkFn
|
||||
([274e9c4d](https://github.com/angular/angular.js/commit/274e9c4ddfd64138d39fcf84047aabc3ccde2f0b))
|
||||
- **$interpolate:** do not keep empty separators
|
||||
([94b5c9f0](https://github.com/angular/angular.js/commit/94b5c9f00edff7fa631d09316ceb9c7fd4c6426a))
|
||||
- **$parse:**
|
||||
- don't bind filters to a context
|
||||
([8863b9d0](https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f))
|
||||
- optimize filter implementation
|
||||
([ece6ef47](https://github.com/angular/angular.js/commit/ece6ef479c741f17fc217d743cad64c516dbed27))
|
||||
- speed up fn invocation for no args case
|
||||
([a17578ad](https://github.com/angular/angular.js/commit/a17578ad3db5d1375aec1d601055ab718eeafd10))
|
||||
- speed up fn invocation by optimizing arg collection
|
||||
([fecfc5b0](https://github.com/angular/angular.js/commit/fecfc5b09feb7e4079364013b0beb6bf204ade2a))
|
||||
- use no-proto maps as caches and avoid hasOwnProperty checks
|
||||
([d302ea0c](https://github.com/angular/angular.js/commit/d302ea0cfade2787d7cc500398b7dcd3e4eff945))
|
||||
- trim expression only if string
|
||||
([a1341223](https://github.com/angular/angular.js/commit/a1341223c084c8188671bb8d6ea1608490b66f9f))
|
||||
- **$rootScope:** do not use `Function::call` when not needed
|
||||
([7eae29e5](https://github.com/angular/angular.js/commit/7eae29e5ab478ccb7e02fee8311f8b99ea1d165d))
|
||||
- **Scope:**
|
||||
- optimize `$watchCollection` when used for watching objects
|
||||
([e822e906](https://github.com/angular/angular.js/commit/e822e9061c2a605649d91abbd641f757e2829275))
|
||||
- don't use forEach in
|
||||
([301463a2](https://github.com/angular/angular.js/commit/301463a2e249011d7cb696c6cf34254f8317a706))
|
||||
- watchCollection optimization
|
||||
([7d96ab0d](https://github.com/angular/angular.js/commit/7d96ab0d132d923ec3e3a212aaf9d79f1d4a02de))
|
||||
- exit $broadcast early if nobody is listening for the given event
|
||||
([a09fa356](https://github.com/angular/angular.js/commit/a09fa356416c033a52666f3becf00524ecff3a03))
|
||||
- use remove the need for the extra watch in $watchGroup
|
||||
([3f0e642e](https://github.com/angular/angular.js/commit/3f0e642eefcbbb315839c4456ba6ac029a7b8a20),
|
||||
[#8396](https://github.com/angular/angular.js/issues/8396))
|
||||
- **benchpress:** add benchpress node module and port over large table test
|
||||
([1229334f](https://github.com/angular/angular.js/commit/1229334fbd8c778e95785d6a5e5589099ce655f7))
|
||||
- **isObject:** use strict comparison
|
||||
([d208ba25](https://github.com/angular/angular.js/commit/d208ba254442649d35f96c76bcd9e47326ec59f3))
|
||||
- **jqLite:**
|
||||
- simplify jqLiteDealoc
|
||||
([f8f7a1df](https://github.com/angular/angular.js/commit/f8f7a1df34560222cb5d2e18d4be996f5553815a))
|
||||
- optimize event handler
|
||||
([d05f27e2](https://github.com/angular/angular.js/commit/d05f27e274c41c33eebf4fe8035715d3f6596069))
|
||||
- only take `str.split()` path when needed
|
||||
([187b1b8e](https://github.com/angular/angular.js/commit/187b1b8ef45babd86afa853dc9321cd23160096e),
|
||||
[#8648](https://github.com/angular/angular.js/issues/8648))
|
||||
- optimize `off()`
|
||||
([abb17cce](https://github.com/angular/angular.js/commit/abb17cce8b459e4646d1c2a2428b691c3d95fb4c))
|
||||
- refactor jqLiteExpandoStore to minimize access to expensive element.ng339 expando property
|
||||
([1e8698b3](https://github.com/angular/angular.js/commit/1e8698b33e61b1a196f05f42856a2da4590a10e1))
|
||||
- microoptimization in chaining fn
|
||||
([fafbd494](https://github.com/angular/angular.js/commit/fafbd494907a8c068d79415b7ba8f42f283be521))
|
||||
- don't use String#split in on() unless we need it
|
||||
([bda673f8](https://github.com/angular/angular.js/commit/bda673f8e785f299407c8c45887f37448a0f0192))
|
||||
- don't check isString many times in constructor
|
||||
([443b521e](https://github.com/angular/angular.js/commit/443b521e22f9ec7009b913a2fe78caee0a515e87))
|
||||
- optimize jqLiteAcceptsData method
|
||||
([b493c62f](https://github.com/angular/angular.js/commit/b493c62f6b3e4288f5dee7c8b5952e088c2e3329))
|
||||
- optimize `append()` and `after()`
|
||||
([8d933bf9](https://github.com/angular/angular.js/commit/8d933bf99520fe3936e33d3ee28fd37e574b99de))
|
||||
- don't register DOM listener for $destroy event
|
||||
([6251751a](https://github.com/angular/angular.js/commit/6251751ad7bc2f3621db538edb5a9d7313a4ce6d))
|
||||
- optimize event listener registration
|
||||
([566f1015](https://github.com/angular/angular.js/commit/566f1015d27118d259e0886910d6b73b3cb0eb10))
|
||||
- improve createEventHandler method by switching from forEach to for loop
|
||||
([e9cd6dc0](https://github.com/angular/angular.js/commit/e9cd6dc055cb7bd80ae9232d8985b2bc3999135e))
|
||||
- don't use `forEach` in `off()`
|
||||
([960a8410](https://github.com/angular/angular.js/commit/960a8410515b2d7d461d7c95e8a2ca3d75129087))
|
||||
- don't recreate the Node.contains polyfill
|
||||
([d1536e7c](https://github.com/angular/angular.js/commit/d1536e7c8bf60549096138d08953a43190c7b1a6))
|
||||
- speed up shallowCopy and special case Attributes cloning
|
||||
([54fa16e4](https://github.com/angular/angular.js/commit/54fa16e45d8769ce6708a28388326db0eea53c7e))
|
||||
- **ngBind:** bypass jquery/jqlite when setting text
|
||||
([0a738ce1](https://github.com/angular/angular.js/commit/0a738ce1760f38efe45e79aa133442be09b56803))
|
||||
- **ngRepeat:**
|
||||
- simplify code and remove duplicate array.length access
|
||||
([08eb0558](https://github.com/angular/angular.js/commit/08eb05583bf39c63fef43b4faf29c61360699c81))
|
||||
- optimize marking of nodes that are being removed via an animation
|
||||
([36e35b2c](https://github.com/angular/angular.js/commit/36e35b2cb17c5ff7c43746d9ac0a259f77ff494e))
|
||||
- use no-proto objects for blockMaps
|
||||
([13d113c5](https://github.com/angular/angular.js/commit/13d113c522f124b91a1fd8606c22bbd399abf121))
|
||||
- move work to compile fn
|
||||
([bdd853cb](https://github.com/angular/angular.js/commit/bdd853cb83839eef9901af164293611eaa23ee2c))
|
||||
- move updateScope fn to factory and reuse it for all repeaters
|
||||
([e58d65a5](https://github.com/angular/angular.js/commit/e58d65a520cfbc630cbfbc248479416777ca16b2))
|
||||
- clone boundary comment nodes
|
||||
([fbd48845](https://github.com/angular/angular.js/commit/fbd48845e0e88e9935f82fe4c9f686ad78b5d924))
|
||||
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
- **$compile:**
|
||||
- due to [09de7b5d](https://github.com/angular/angular.js/commit/09de7b5db466498becb295ecf5c1d0a698b1512c),
|
||||
|
||||
|
||||
Now, `ng-attr-*` will never add the attribute to the DOM if any of the interpolated expressions
|
||||
evaluate to `undefined`.
|
||||
|
||||
To work around this, initialize values which are intended to be the empty string with the
|
||||
empty string:
|
||||
|
||||
For example, given the following markup:
|
||||
|
||||
```html
|
||||
<div ng-attr-style="border-radius: {{value}}{{units}}"></div>
|
||||
```
|
||||
|
||||
If `$scope.value` is `4`, and `$scope.units` is `undefined`, the resulting markup is unchanged:
|
||||
|
||||
```html
|
||||
<div ng-attr-style="border-radius: {{value}}{{units}}"></div>
|
||||
```
|
||||
|
||||
However, if $scope.units is `""`, then the resulting markup is updated:
|
||||
|
||||
```html
|
||||
<div ng-attr-style="border-radius: {{value}}{{units}}" style="border-radius: 4"></div>
|
||||
```
|
||||
|
||||
Closes #8376
|
||||
Closes #8399
|
||||
|
||||
- due to [0d608d04](https://github.com/angular/angular.js/commit/0d608d041f37a659d8d8ba7a9b688e132587035d),
|
||||
element-transcluded directives now have an extra comment automatically appended to their cloned DOM
|
||||
|
||||
This comment is usually needed to keep track the end boundary in the event child directives modify the root node(s).
|
||||
If not used for this purpose it can be safely ignored.
|
||||
|
||||
- due to [75c4cbf8](https://github.com/angular/angular.js/commit/75c4cbf81fcd6d49656d3cb044e59e5fd24e0479),
|
||||
`directive.type` was renamed to `directive.templateNamespace`
|
||||
|
||||
This change is breaking only within 1.3.0-beta releases: `directive.type` was renamed to `directive.templateNamespace`
|
||||
|
||||
The property name `type` was too general.
|
||||
|
||||
- **$parse:** due to [8863b9d0](https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f),
|
||||
`this` in filters is now undefined and no longer the scope
|
||||
|
||||
It's a bad practice for filters to have hidden dependencies, so pulling stuff from scope directly
|
||||
is not a good idea. Scope being the filter context was never documented as public API, so we don't
|
||||
expect that any significant code depends on this behavior.
|
||||
|
||||
If an existing filter has a dependency on the scope instance, the scope reference can
|
||||
be passed into the filter as a filter argument (this is highly discouraged for new code):
|
||||
|
||||
Before: `{{ user.name | customFilter }}`
|
||||
After: `{{ user.name | customFilter:this }}`
|
||||
|
||||
- **Scope:** due to [0554c1aa](https://github.com/angular/angular.js/commit/0554c1aae49a81691154a77e70b602b0f24dca81),
|
||||
`deregisterNotifier` callback for `$watch` is no longer available
|
||||
|
||||
This API was available only in the last few 1.3 beta versions and is not
|
||||
very useful for applications, so we don't expect that anyone will be affected
|
||||
by this change.
|
||||
|
||||
- **input:** due to [a7fb357f](https://github.com/angular/angular.js/commit/a7fb357fa122e0a056ce1de838a2dfaf1ebc2953),
|
||||
by default, do not trim `input[type=password]` values.
|
||||
|
||||
Previously, `input[type=password]` would trim values by default, and would require an explicit `ng-trim="false"`
|
||||
to disable the trimming behaviour. After this change, `ng-trim` no longer affects `input[type=password]`, and will
|
||||
never trim the password value.
|
||||
|
||||
Closes #8250
|
||||
Closes #8230
|
||||
|
||||
|
||||
|
||||
<a name="1.3.0-beta.18"></a>
|
||||
# 1.3.0-beta.18 spontaneous-combustion (2014-08-12)
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **$compile:** make '='-bindings NaN-aware
|
||||
([5038bf79](https://github.com/angular/angular.js/commit/5038bf79c6c8251d7449d887b44a4321e619c534),
|
||||
[#8553](https://github.com/angular/angular.js/issues/8553), [#8554](https://github.com/angular/angular.js/issues/8554))
|
||||
- **$location:** add semicolon to whitelist of delimiters to unencode
|
||||
([36258033](https://github.com/angular/angular.js/commit/3625803349de04f175f87a22cbb608738003811a),
|
||||
[#5019](https://github.com/angular/angular.js/issues/5019))
|
||||
- **$parse:**
|
||||
- one-time binding for literal expressions works as expected
|
||||
([c024f282](https://github.com/angular/angular.js/commit/c024f28217cf8eedd695dd4b933ecf2ba4243c15),
|
||||
[#8209](https://github.com/angular/angular.js/issues/8209))
|
||||
- correctly assign expressions who's path is undefined and that use brackets notation
|
||||
([c03ad249](https://github.com/angular/angular.js/commit/c03ad249033e701f3ad7aa358102e1cb87f5025c),
|
||||
[#8039](https://github.com/angular/angular.js/issues/8039))
|
||||
- **Scope:** add deregisterNotifier to oneTimeLiteralWatch signature
|
||||
([a001a417](https://github.com/angular/angular.js/commit/a001a417d5c12bad0fa09c88e045622b95239e2f))
|
||||
- **jqLite:**
|
||||
- allow `triggerHandler()` to accept custom event
|
||||
([01d81cda](https://github.com/angular/angular.js/commit/01d81cdab3dbbcb8b4204769eb5272096eb0837f),
|
||||
[#8469](https://github.com/angular/angular.js/issues/8469))
|
||||
- fix regression where mutating the dom tree on a event breaks jqLite.remove
|
||||
([a00c9bca](https://github.com/angular/angular.js/commit/a00c9bca401abe5b5b0a217be82333056422c811),
|
||||
[#8359](https://github.com/angular/angular.js/issues/8359))
|
||||
- **ngSanitize:** ensure `html` is a string in htmlParser()
|
||||
([34781f18](https://github.com/angular/angular.js/commit/34781f18cb75ded9ae29f4b78f5bacd079f76709),
|
||||
[#8417](https://github.com/angular/angular.js/issues/8417), [#8416](https://github.com/angular/angular.js/issues/8416))
|
||||
- **select:**
|
||||
- ensure that at least one option has the `selected` attribute set
|
||||
([25a476ea](https://github.com/angular/angular.js/commit/25a476ea096b200fb4f422aaa9cd7215e2596ad3),
|
||||
[#8366](https://github.com/angular/angular.js/issues/8366), [#8429](https://github.com/angular/angular.js/issues/8429))
|
||||
- do not update selected property of an option element on digest with no change event
|
||||
([cdc7db3f](https://github.com/angular/angular.js/commit/cdc7db3f35368a9175ed96c63f4bf56593fe1876),
|
||||
[#8221](https://github.com/angular/angular.js/issues/8221), [#7715](https://github.com/angular/angular.js/issues/7715))
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- **$parse:** allow for assignments in ternary operator branches
|
||||
([2d678f1d](https://github.com/angular/angular.js/commit/2d678f1d0a3714fdd49e582b92787312af129947),
|
||||
[#8512](https://github.com/angular/angular.js/issues/8512), [#8484](https://github.com/angular/angular.js/issues/8484))
|
||||
- **form:** Add new $submitted state to forms
|
||||
([108a69be](https://github.com/angular/angular.js/commit/108a69be17df5884d026c57b2be3235c576250fe),
|
||||
[#8056](https://github.com/angular/angular.js/issues/8056))
|
||||
- **http:** allow caching for JSONP requests
|
||||
([3607c982](https://github.com/angular/angular.js/commit/3607c9822f57b4d01b3f09a6ae4efc7168bec6c5),
|
||||
[#1947](https://github.com/angular/angular.js/issues/1947), [#8356](https://github.com/angular/angular.js/issues/8356))
|
||||
- **jQuery:** upgrade to jQuery to 2.1.1
|
||||
([9e7cb3c3](https://github.com/angular/angular.js/commit/9e7cb3c37543008e6236bb5a2c4536df2e1e43a9))
|
||||
- **ngMock:** allow override of when/expect definitions
|
||||
([477626d8](https://github.com/angular/angular.js/commit/477626d846b4de65d1d5c7071e6a94361395ff42),
|
||||
[#5766](https://github.com/angular/angular.js/issues/5766), [#8352](https://github.com/angular/angular.js/issues/8352))
|
||||
|
||||
|
||||
## Performance Improvements
|
||||
|
||||
- **$q:** move Deferred and Promise methods to prototypes
|
||||
([23bc92b1](https://github.com/angular/angular.js/commit/23bc92b17df882a907fb326320f0622717fefe7b),
|
||||
[#8300](https://github.com/angular/angular.js/issues/8300))
|
||||
- **input:** prevent additional $digest when input is already touched
|
||||
([dd2a803f](https://github.com/angular/angular.js/commit/dd2a803f4f03ab629a51623c026d3e3f9dc9e91f),
|
||||
[#8450](https://github.com/angular/angular.js/issues/8450))
|
||||
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
- **jQuery:** due to [9e7cb3c3](https://github.com/angular/angular.js/commit/9e7cb3c37543008e6236bb5a2c4536df2e1e43a9),
|
||||
Angular no longer supports jQuery versions below 2.1.1.
|
||||
|
||||
|
||||
<a name="1.2.22"></a>
|
||||
# 1.2.22 finicky-pleasure (2014-08-12)
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **$compile:** make '='-bindings NaN-aware
|
||||
([0b0acb03](https://github.com/angular/angular.js/commit/0b0acb03424a273965fa6e6175d584f53a90252c),
|
||||
[#8553](https://github.com/angular/angular.js/issues/8553), [#8554](https://github.com/angular/angular.js/issues/8554))
|
||||
- **$parse:** correctly assign expressions who's path is undefined and that use brackets notation
|
||||
([60366c8d](https://github.com/angular/angular.js/commit/60366c8d0bb5ffdd1bd8a8971820eb4868f3efd5),
|
||||
[#8039](https://github.com/angular/angular.js/issues/8039))
|
||||
- **jqLite:** allow `triggerHandler()` to accept custom event
|
||||
([d262378b](https://github.com/angular/angular.js/commit/d262378b7c047dcd925cf4b55b80c0697b292232),
|
||||
[#8469](https://github.com/angular/angular.js/issues/8469), [#8505](https://github.com/angular/angular.js/issues/8505))
|
||||
- **ngSanitize:** ensure `html` is a string in htmlParser()
|
||||
([9ee07551](https://github.com/angular/angular.js/commit/9ee075518f1ccec0f34aa49bd007aa2ed9a3b12e),
|
||||
[#8417](https://github.com/angular/angular.js/issues/8417), [#8416](https://github.com/angular/angular.js/issues/8416))
|
||||
- **select:**
|
||||
- ensure that at least one option has the `selected` attribute set
|
||||
([79538afd](https://github.com/angular/angular.js/commit/79538afd7bd730d49be8eb988a3a54848d8ddaec),
|
||||
[#8366](https://github.com/angular/angular.js/issues/8366), [#8429](https://github.com/angular/angular.js/issues/8429))
|
||||
- do not update selected property of an option element on digest with no change event
|
||||
([c2860944](https://github.com/angular/angular.js/commit/c2860944c61a0b910f703fe8a9717188ed387893),
|
||||
[#8221](https://github.com/angular/angular.js/issues/8221), [#7715](https://github.com/angular/angular.js/issues/7715))
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- **$parse:** allow for assignments in ternary operator branches
|
||||
([93b0c2d8](https://github.com/angular/angular.js/commit/93b0c2d8925e354159cc421e5be1bca9582f7b70),
|
||||
[#8512](https://github.com/angular/angular.js/issues/8512), [#8484](https://github.com/angular/angular.js/issues/8484))
|
||||
- **http:** allow caching for JSONP requests
|
||||
([eab5731a](https://github.com/angular/angular.js/commit/eab5731afc788c59f3f2988db372299268df8614),
|
||||
[#1947](https://github.com/angular/angular.js/issues/1947), [#8356](https://github.com/angular/angular.js/issues/8356))
|
||||
|
||||
|
||||
<a name="1.3.0-beta.17"></a>
|
||||
# 1.3.0-beta.17 turing-autocompletion (2014-07-25)
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.lang-text * {
|
||||
color: #333333!important;
|
||||
}
|
||||
|
||||
.pln {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
@@ -75,4 +75,14 @@ describe('docs.angularjs.org', function () {
|
||||
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
|
||||
});
|
||||
});
|
||||
|
||||
describe("API pages", function() {
|
||||
it("should display links to code on GitHub", function() {
|
||||
browser.get('index-debug.html#!/api/ng/service/$http');
|
||||
expect(element(by.css('.improve-docs')).getAttribute('href')).toMatch(/https?:\/\/github\.com\/angular\/angular\.js\/edit\/.+\/src\/ng\/http\.js/);
|
||||
|
||||
browser.get('index-debug.html#!/api/ng/service/$http');
|
||||
expect(element(by.css('.view-source')).getAttribute('href')).toMatch(/https?:\/\/github\.com\/angular\/angular\.js\/tree\/.+\/src\/ng\/http\.js#L\d+/);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -33,7 +33,8 @@ module.exports = {
|
||||
innerTest: file.fileContents,
|
||||
pathPrefix: '.', // Hold for if we test with full jQuery
|
||||
exampleId: example.id,
|
||||
description: example.doc.id
|
||||
description: example.doc.id,
|
||||
'ng-app-included': example['ng-app-included']
|
||||
};
|
||||
|
||||
if (env === 'jquery') {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
describe("{$ doc.description $}", function() {
|
||||
var rootEl;
|
||||
beforeEach(function() {
|
||||
rootEl = browser.rootEl;{% if doc['ng-app-included'] %}
|
||||
browser.rootEl = '[ng-app]';{% endif %}
|
||||
browser.get("{$ doc.pathPrefix $}/{$ doc.examplePath $}");
|
||||
});
|
||||
|
||||
{% if doc['ng-app-included'] %}afterEach(function() { browser.rootEl = rootEl; });{% endif %}
|
||||
{$ doc.innerTest $}
|
||||
});
|
||||
|
||||
@@ -135,7 +135,7 @@ These can be used interchangeably as you see fit and are equivalent.
|
||||
|
||||
### Implicit Dependencies
|
||||
|
||||
The simplest way to get hold of the dependencies, is to assume that the function parameter names
|
||||
The simplest way to get hold of the dependencies is to assume that the function parameter names
|
||||
are the names of the dependencies.
|
||||
|
||||
```js
|
||||
@@ -144,7 +144,7 @@ function MyController($scope, greeter) {
|
||||
}
|
||||
```
|
||||
|
||||
Given a function the injector can infer the names of the service to inject by examining the
|
||||
Given a function the injector can infer the names of the services to inject by examining the
|
||||
function declaration and extracting the parameter names. In the above example `$scope`, and
|
||||
`greeter` are two services which need to be injected into the function.
|
||||
|
||||
@@ -154,7 +154,7 @@ rename the method parameter names. This makes this way of annotating only useful
|
||||
|
||||
### `$inject` Property Annotation
|
||||
|
||||
To allow the minifiers to rename the function parameters and still be able to inject right services,
|
||||
To allow the minifiers to rename the function parameters and still be able to inject the right services,
|
||||
the function needs to be annotated with the `$inject` property. The `$inject` property is an array
|
||||
of service names to inject.
|
||||
|
||||
@@ -166,7 +166,7 @@ MyController['$inject'] = ['$scope', 'greeter'];
|
||||
```
|
||||
|
||||
In this scenario the ordering of the values in the `$inject` array must match the ordering of the
|
||||
arguments to inject. Using above code snippet as an example, `$scope` will be injected into
|
||||
arguments to inject. Using the above code snippet as an example, `$scope` will be injected into
|
||||
`renamed$scope` and `greeter` into `renamedGreeter`. Care must be taken that the `$inject`
|
||||
annotation is kept in sync with the actual arguments in the function declaration.
|
||||
|
||||
@@ -206,7 +206,7 @@ someModule.factory('greeter', ['$window', function(renamed$window) {
|
||||
}]);
|
||||
```
|
||||
|
||||
Here, instead of simply providing the factory function, we pass an array, whose elements consist of
|
||||
Here, instead of simply providing the factory function, we pass an array whose elements consist of
|
||||
a list of strings (the names of the dependencies) followed by the function itself.
|
||||
|
||||
Keep in mind that all of the annotation styles are equivalent and can be used anywhere in Angular
|
||||
|
||||
@@ -26,10 +26,12 @@ should be bootstrapped. There are several advantages to this approach:
|
||||
|
||||
I'm in a hurry. How do I get a Hello World module working?
|
||||
|
||||
<example module='myApp'>
|
||||
<example ng-app-included="true">
|
||||
<file name="index.html">
|
||||
<div>
|
||||
{{ 'World' | greet }}
|
||||
<div ng-app="myApp">
|
||||
<div>
|
||||
{{ 'World' | greet }}
|
||||
</div>
|
||||
</div>
|
||||
</file>
|
||||
|
||||
@@ -56,7 +58,7 @@ I'm in a hurry. How do I get a Hello World module working?
|
||||
Important things to notice:
|
||||
|
||||
* The {@link angular.Module Module} API
|
||||
* The reference to `myApp` module in `<html ng-app="myApp">`.
|
||||
* The reference to `myApp` module in `<div ng-app="myApp">`.
|
||||
This is what bootstraps the app using your module.
|
||||
* The empty array in `angular.module('myApp', [])`.
|
||||
This array is the list of modules `myApp` depends on.
|
||||
|
||||
@@ -62,13 +62,13 @@ minified AngularJS files:
|
||||
|
||||
```shell
|
||||
# Clone your Github repository:
|
||||
git clone git@github.com:<github username>/angular.js.git
|
||||
git clone "git@github.com:<github username>/angular.js.git"
|
||||
|
||||
# Go to the AngularJS directory:
|
||||
cd angular.js
|
||||
|
||||
# Add the main AngularJS repository as an upstream remote to your repository:
|
||||
git remote add upstream https://github.com/angular/angular.js.git
|
||||
git remote add upstream "https://github.com/angular/angular.js.git"
|
||||
|
||||
# Install node.js dependencies:
|
||||
npm install
|
||||
@@ -126,13 +126,13 @@ made available a local web server based on Node.js.
|
||||
```
|
||||
|
||||
2. To access the local server, enter the following URL into your web browser:
|
||||
```
|
||||
```text
|
||||
http://localhost:8000/
|
||||
```
|
||||
By default, it serves the contents of the AngularJS project directory.
|
||||
|
||||
3. To access the locally served docs, visit this URL:
|
||||
```
|
||||
```text
|
||||
http://localhost:8000/build/docs/
|
||||
```
|
||||
|
||||
@@ -165,7 +165,7 @@ change. To execute tests in this mode run:
|
||||
2. To capture more browsers, open this URL in the desired browser (URL might be different if you have multiple instance
|
||||
of Karma running, read Karma's console output for the correct URL):
|
||||
|
||||
```shell
|
||||
```text
|
||||
http://localhost:9876/
|
||||
```
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ really digging into it. If you're looking for a shorter introduction to AngularJ
|
||||
|
||||
# Get Started
|
||||
|
||||
The rest of this page explains how you can set up your machine to work with the code on your local
|
||||
machine. If you just want to read the tutorial then you can just go straight to the first step:
|
||||
The rest of this page explains how you can set up your local machine for development.
|
||||
If you just want to read the tutorial then you can just go straight to the first step:
|
||||
[Step 0 - Bootstrapping](tutorial/step_00).
|
||||
|
||||
# Working with the code
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ var config = require('./protractor-shared-conf').config;
|
||||
|
||||
config.specs = [
|
||||
'build/docs/ptore2e/**/*.js',
|
||||
'test/e2e/docsAppE2E.js'
|
||||
'docs/app/e2e/docsAppE2E.js'
|
||||
];
|
||||
|
||||
config.capabilities = {
|
||||
|
||||
@@ -5,7 +5,7 @@ exports.config = {
|
||||
|
||||
specs: [
|
||||
'build/docs/ptore2e/**/*.js',
|
||||
'test/e2e/docsAppE2E.js'
|
||||
'docs/app/e2e/docsAppE2E.js'
|
||||
],
|
||||
|
||||
capabilities: {
|
||||
|
||||
@@ -14,7 +14,7 @@ elif [ $JOB = "e2e" ]; then
|
||||
if [ $TEST_TARGET = "jquery" ]; then
|
||||
TARGET_SPECS="build/docs/ptore2e/**/*jquery_test.js"
|
||||
elif [ $TEST_TARGET = "doce2e" ]; then
|
||||
TARGET_SPECS="test/e2e/docsAppE2E.js"
|
||||
TARGET_SPECS="docs/app/e2e/docsAppE2E.js"
|
||||
fi
|
||||
grunt test:travis-protractor --specs "$TARGET_SPECS"
|
||||
else
|
||||
|
||||
+14
-5
@@ -820,9 +820,13 @@ function copy(source, destination, stackSource, stackDest) {
|
||||
}
|
||||
} else {
|
||||
var h = destination.$$hashKey;
|
||||
forEach(destination, function(value, key) {
|
||||
delete destination[key];
|
||||
});
|
||||
if (isArray(destination)) {
|
||||
destination.length = 0;
|
||||
} else {
|
||||
forEach(destination, function(value, key) {
|
||||
delete destination[key];
|
||||
});
|
||||
}
|
||||
for ( var key in source) {
|
||||
result = copy(source[key], null, stackSource, stackDest);
|
||||
if (isObject(source[key])) {
|
||||
@@ -907,7 +911,8 @@ function equals(o1, o2) {
|
||||
return true;
|
||||
}
|
||||
} else if (isDate(o1)) {
|
||||
return isDate(o2) && o1.getTime() == o2.getTime();
|
||||
if (!isDate(o2)) return false;
|
||||
return (isNaN(o1.getTime()) && isNaN(o2.getTime())) || (o1.getTime() === o2.getTime());
|
||||
} else if (isRegExp(o1) && isRegExp(o2)) {
|
||||
return o1.toString() == o2.toString();
|
||||
} else {
|
||||
@@ -1345,7 +1350,11 @@ function bootstrap(element, modules) {
|
||||
|
||||
if (element.injector()) {
|
||||
var tag = (element[0] === document) ? 'document' : startingTag(element);
|
||||
throw ngMinErr('btstrpd', "App Already Bootstrapped with this Element '{0}'", tag);
|
||||
//Encode angle brackets to prevent input from being sanitized to empty string #8683
|
||||
throw ngMinErr(
|
||||
'btstrpd',
|
||||
"App Already Bootstrapped with this Element '{0}'",
|
||||
tag.replace(/</,'<').replace(/>/,'>'));
|
||||
}
|
||||
|
||||
modules = modules || [];
|
||||
|
||||
+3
-2
@@ -114,7 +114,7 @@ function setupModuleLoader(window) {
|
||||
* @ngdoc property
|
||||
* @name angular.Module#requires
|
||||
* @module ng
|
||||
* @returns {Array.<string>} List of module names which must be loaded before this module.
|
||||
*
|
||||
* @description
|
||||
* Holds the list of modules which the injector will load before the current module is
|
||||
* loaded.
|
||||
@@ -125,8 +125,9 @@ function setupModuleLoader(window) {
|
||||
* @ngdoc property
|
||||
* @name angular.Module#name
|
||||
* @module ng
|
||||
* @returns {string} Name of the module.
|
||||
*
|
||||
* @description
|
||||
* Name of the module.
|
||||
*/
|
||||
name: name,
|
||||
|
||||
|
||||
@@ -67,8 +67,10 @@
|
||||
$scope.keys = [];
|
||||
$scope.cache = $cacheFactory('cacheId');
|
||||
$scope.put = function(key, value) {
|
||||
$scope.cache.put(key, value);
|
||||
$scope.keys.push(key);
|
||||
if ($scope.cache.get(key) === undefined) {
|
||||
$scope.keys.push(key);
|
||||
}
|
||||
$scope.cache.put(key, value === undefined ? null : value);
|
||||
};
|
||||
}]);
|
||||
</file>
|
||||
|
||||
+7
-5
@@ -191,9 +191,9 @@
|
||||
*
|
||||
* * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
|
||||
* * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
|
||||
* * `^` - Locate the required controller by searching the element's parents. Throw an error if not found.
|
||||
* * `?^` - Attempt to locate the required controller by searching the element's parents or pass `null` to the
|
||||
* `link` fn if not found.
|
||||
* * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
|
||||
* * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
|
||||
* `null` to the `link` fn if not found.
|
||||
*
|
||||
*
|
||||
* #### `controllerAs`
|
||||
@@ -2011,8 +2011,10 @@ function directiveNormalize(name) {
|
||||
/**
|
||||
* @ngdoc property
|
||||
* @name $compile.directive.Attributes#$attr
|
||||
* @returns {object} A map of DOM element attribute names to the normalized name. This is
|
||||
* needed to do reverse lookup from normalized name back to actual name.
|
||||
*
|
||||
* @description
|
||||
* A map of DOM element attribute names to the normalized name. This is
|
||||
* needed to do reverse lookup from normalized name back to actual name.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
|
||||
* We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
|
||||
* ```html
|
||||
* <div ng-init="scope = { isDisabled: false }">
|
||||
* <button disabled="{{scope.isDisabled}}">Disabled</button>
|
||||
@@ -380,8 +380,12 @@ forEach(['src', 'srcset', 'href'], function(attrName) {
|
||||
}
|
||||
|
||||
attr.$observe(normalized, function(value) {
|
||||
if (!value)
|
||||
return;
|
||||
if (!value) {
|
||||
if (attrName === 'href') {
|
||||
attr.$set(name, null);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
attr.$set(name, value);
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ var inputType = {
|
||||
* @name input[text]
|
||||
*
|
||||
* @description
|
||||
* Standard HTML text input with angular data binding.
|
||||
* Standard HTML text input with angular data binding, inherited by most of the `input` elements.
|
||||
*
|
||||
* *NOTE* Not every feature offered is available for all input types.
|
||||
*
|
||||
* @param {string} ngModel Assignable angular expression to data-bind to.
|
||||
* @param {string=} name Property name of the form under which the control is published.
|
||||
@@ -35,6 +37,8 @@ var inputType = {
|
||||
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
* @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
|
||||
* This parameter is ignored for input[type=password] controls, which will never trim the
|
||||
* input.
|
||||
*
|
||||
* @example
|
||||
<example name="text-input-directive" module="textInputExample">
|
||||
@@ -474,6 +478,7 @@ function addNativeHtml5Validators(ctrl, validatorName, badFlags, ignoreFlags, va
|
||||
function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
var validity = element.prop(VALIDITY_STATE_PROPERTY);
|
||||
var placeholder = element[0].placeholder, noevent = {};
|
||||
var type = lowercase(element[0].type);
|
||||
ctrl.$$validityState = validity;
|
||||
|
||||
// In composition mode, users are still inputing intermediate text buffer,
|
||||
@@ -507,8 +512,8 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
|
||||
// By default we will trim the value
|
||||
// If the attribute ng-trim exists we will avoid trimming
|
||||
// e.g. <input ng-model="foo" ng-trim="false">
|
||||
if (toBoolean(attr.ngTrim || 'T')) {
|
||||
// If input type is 'password', the value is never trimmed
|
||||
if (type !== 'password' && (toBoolean(attr.ngTrim || 'T'))) {
|
||||
value = trim(value);
|
||||
}
|
||||
|
||||
@@ -783,6 +788,8 @@ function checkboxInputType(scope, element, attr, ctrl) {
|
||||
* HTML input element control with angular data-binding. Input control follows HTML5 input types
|
||||
* and polyfills the HTML5 validation behavior for older browsers.
|
||||
*
|
||||
* *NOTE* Not every feature offered is available for all input types.
|
||||
*
|
||||
* @param {string} ngModel Assignable angular expression to data-bind to.
|
||||
* @param {string=} name Property name of the form under which the control is published.
|
||||
* @param {string=} required Sets `required` validation error key if the value is not entered.
|
||||
@@ -796,6 +803,9 @@ function checkboxInputType(scope, element, attr, ctrl) {
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ngChange Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
* @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
|
||||
* This parameter is ignored for input[type=password] controls, which will never trim the
|
||||
* input.
|
||||
*
|
||||
* @example
|
||||
<example name="input-directive" module="inputExample">
|
||||
|
||||
@@ -150,7 +150,6 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
|
||||
* @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
|
||||
*
|
||||
* @example
|
||||
Try it here: enter text in text box and watch the greeting change.
|
||||
|
||||
<example module="bindHtmlExample" deps="angular-sanitize.js">
|
||||
<file name="index.html">
|
||||
|
||||
@@ -18,9 +18,13 @@
|
||||
*
|
||||
* - `function`: Getter function. The result of this function will be sorted using the
|
||||
* `<`, `=`, `>` operator.
|
||||
* - `string`: An Angular expression which evaluates to an object to order by, such as 'name'
|
||||
* to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control
|
||||
* ascending or descending sort order (for example, +name or -name).
|
||||
* - `string`: An Angular expression. The result of this expression is used to compare elements
|
||||
* (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
|
||||
* 3 first characters of a property called `name`). The result of a constant expression
|
||||
* is interpreted as a property name to be used in comparisons (for example `"special name"`
|
||||
* to sort object by the value of their `special name` property). An expression can be
|
||||
* optionally prefixed with `+` or `-` to control ascending or descending sort order
|
||||
* (for example, `+name` or `-name`).
|
||||
* - `Array`: An array of function or string predicates. The first predicate in the array
|
||||
* is used for sorting, but when two items are equivalent, the next predicate is used.
|
||||
*
|
||||
|
||||
+1
-1
@@ -540,7 +540,7 @@ function $HttpProvider() {
|
||||
* that only JavaScript running on your domain could have sent the request. The token must be
|
||||
* unique for each user and must be verifiable by the server (to prevent the JavaScript from
|
||||
* making up its own tokens). We recommend that the token is a digest of your site's
|
||||
* authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))
|
||||
* authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))
|
||||
* for added security.
|
||||
*
|
||||
* The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ function $IntervalProvider() {
|
||||
* };
|
||||
*
|
||||
* $scope.$on('$destroy', function() {
|
||||
* // Make sure that the interval nis destroyed too
|
||||
* // Make sure that the interval is destroyed too
|
||||
* $scope.stopFight();
|
||||
* });
|
||||
* }])
|
||||
|
||||
+2
-1
@@ -670,7 +670,7 @@ function $LocationProvider(){
|
||||
// http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
|
||||
var href = elm.attr('href') || elm.attr('xlink:href');
|
||||
|
||||
if (href.indexOf('://') < 0) { // Ignore absolute URLs
|
||||
if (href && href.indexOf('://') < 0) { // Ignore absolute URLs
|
||||
var prefix = '#' + hashPrefix;
|
||||
if (href[0] == '/') {
|
||||
// absolute path - replace old path
|
||||
@@ -682,6 +682,7 @@ function $LocationProvider(){
|
||||
// relative path - join with current path
|
||||
var stack = $location.path().split("/"),
|
||||
parts = href.split("/");
|
||||
if (stack.length === 2 && !stack[1]) stack.length = 1;
|
||||
for (var i=0; i<parts.length; i++) {
|
||||
if (parts[i] == ".")
|
||||
continue;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
function $$SanitizeUriProvider() {
|
||||
var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
|
||||
imgSrcSanitizationWhitelist = /^\s*(https?|ftp|file):|data:image\//;
|
||||
imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file):|data:image\/)/;
|
||||
|
||||
/**
|
||||
* @description
|
||||
|
||||
Vendored
+2
@@ -1996,6 +1996,7 @@ if(window.jasmine || window.mocha) {
|
||||
* @description
|
||||
*
|
||||
* *NOTE*: This function is also published on window for easy access.<br>
|
||||
* *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
|
||||
*
|
||||
* This function registers a module configuration code. It collects the configuration information
|
||||
* which will be used when the injector is created by {@link angular.mock.inject inject}.
|
||||
@@ -2038,6 +2039,7 @@ if(window.jasmine || window.mocha) {
|
||||
* @description
|
||||
*
|
||||
* *NOTE*: This function is also published on window for easy access.<br>
|
||||
* *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
|
||||
*
|
||||
* The inject function wraps a function into an injectable function. The inject() creates new
|
||||
* instance of {@link auto.$injector $injector} per test, which is then used for
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
*/
|
||||
angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
|
||||
var LINKY_URL_REGEXP =
|
||||
/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,
|
||||
/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,
|
||||
MAILTO_REGEXP = /^mailto:/;
|
||||
|
||||
return function(text, target) {
|
||||
|
||||
+12
-1
@@ -174,6 +174,12 @@ describe('angular', function() {
|
||||
expect(aCopy).toBe(aCopy.self);
|
||||
expect(aCopy.selfs[2]).not.toBe(a.selfs[2]);
|
||||
});
|
||||
|
||||
it('should clear destination arrays correctly when source is non-array', function() {
|
||||
expect(copy(null, [1,2,3])).toEqual([]);
|
||||
expect(copy(undefined, [1,2,3])).toEqual([]);
|
||||
expect(copy({0: 1, 1: 2}, [1,2,3])).toEqual([1,2]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("extend", function() {
|
||||
@@ -360,6 +366,11 @@ describe('angular', function() {
|
||||
expect(equals(new Date(0), new Date(1))).toBe(false);
|
||||
expect(equals(new Date(0), 0)).toBe(false);
|
||||
expect(equals(0, new Date(0))).toBe(false);
|
||||
|
||||
expect(equals(new Date(undefined), new Date(undefined))).toBe(true);
|
||||
expect(equals(new Date(undefined), new Date(0))).toBe(false);
|
||||
expect(equals(new Date(undefined), new Date(null))).toBe(false);
|
||||
expect(equals(new Date(undefined), new Date('wrong'))).toBe(true);
|
||||
});
|
||||
|
||||
it('should correctly test for keys that are present on Object.prototype', function() {
|
||||
@@ -822,7 +833,7 @@ describe('angular', function() {
|
||||
expect(function () {
|
||||
angular.bootstrap(element);
|
||||
}).toThrowMatching(
|
||||
/\[ng:btstrpd\] App Already Bootstrapped with this Element '<div class="?ng\-scope"?( ng[0-9]+="?[0-9]+"?)?>'/i
|
||||
/\[ng:btstrpd\] App Already Bootstrapped with this Element '<div class="?ng\-scope"?( ng[0-9]+="?[0-9]+"?)?>'/i
|
||||
);
|
||||
|
||||
dealoc(element);
|
||||
|
||||
@@ -252,6 +252,23 @@ describe('ngHref', function() {
|
||||
expect(element.attr('href')).toEqual('http://server');
|
||||
}));
|
||||
|
||||
it('should not set the href if ng-href is empty', inject(function($rootScope, $compile) {
|
||||
$rootScope.url = null;
|
||||
element = $compile('<a ng-href="{{url}}"></a>')($rootScope);
|
||||
$rootScope.$digest();
|
||||
expect(element.attr('href')).toEqual(undefined);
|
||||
}));
|
||||
|
||||
it('should remove the href if ng-href changes to empty', inject(function($rootScope, $compile) {
|
||||
$rootScope.url = 'http://www.google.com/';
|
||||
element = $compile('<a ng-href="{{url}}"></a>')($rootScope);
|
||||
$rootScope.$digest();
|
||||
|
||||
$rootScope.url = null;
|
||||
$rootScope.$digest();
|
||||
expect(element.attr('href')).toEqual(undefined);
|
||||
}));
|
||||
|
||||
if (isDefined(window.SVGElement)) {
|
||||
describe('SVGAElement', function() {
|
||||
it('should interpolate the expression and bind to xlink:href', inject(function($compile, $rootScope) {
|
||||
|
||||
@@ -1546,6 +1546,30 @@ describe('input', function() {
|
||||
expect(scope.items[0].selected).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('password', function() {
|
||||
// Under no circumstances should input[type=password] trim inputs
|
||||
it('should not trim if ngTrim is unspecified', function() {
|
||||
compileInput('<input type="password" ng-model="password">');
|
||||
changeInputValueTo(' - - untrimmed - - ');
|
||||
expect(scope.password.length).toBe(' - - untrimmed - - '.length);
|
||||
});
|
||||
|
||||
|
||||
it('should not trim if ngTrim !== false', function() {
|
||||
compileInput('<input type="password" ng-model="password" ng-trim="true">');
|
||||
changeInputValueTo(' - - untrimmed - - ');
|
||||
expect(scope.password.length).toBe(' - - untrimmed - - '.length);
|
||||
});
|
||||
|
||||
|
||||
it('should not trim if ngTrim === false', function() {
|
||||
compileInput('<input type="password" ng-model="password" ng-trim="false">');
|
||||
changeInputValueTo(' - - untrimmed - - ');
|
||||
expect(scope.password.length).toBe(' - - untrimmed - - '.length);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('NgModel animations', function() {
|
||||
|
||||
+40
-6
@@ -811,15 +811,21 @@ describe('$location', function() {
|
||||
attrs = attrs ? ' ' + attrs + ' ' : '';
|
||||
|
||||
// fake the base behavior
|
||||
if (!relLink) {
|
||||
if (linkHref[0] == '/') {
|
||||
linkHref = 'http://host.com' + linkHref;
|
||||
} else if(!linkHref.match(/:\/\//)) {
|
||||
linkHref = 'http://host.com/base/' + linkHref;
|
||||
if (typeof linkHref === 'string') {
|
||||
if (!relLink) {
|
||||
if (linkHref[0] == '/') {
|
||||
linkHref = 'http://host.com' + linkHref;
|
||||
} else if(!linkHref.match(/:\/\//)) {
|
||||
linkHref = 'http://host.com/base/' + linkHref;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
link = jqLite('<a href="' + linkHref + '"' + attrs + '>' + content + '</a>')[0];
|
||||
if (linkHref) {
|
||||
link = jqLite('<a href="' + linkHref + '"' + attrs + '>' + content + '</a>')[0];
|
||||
} else {
|
||||
link = jqLite('<a ' + attrs + '>' + content + '</a>')[0];
|
||||
}
|
||||
|
||||
$provide.value('$sniffer', {history: supportHist});
|
||||
$locationProvider.html5Mode(html5Mode);
|
||||
@@ -934,6 +940,34 @@ describe('$location', function() {
|
||||
});
|
||||
|
||||
|
||||
// Regression (gh-7721)
|
||||
it('should not throw when clicking anchor with no href attribute when history enabled on old browser', function() {
|
||||
configureService(null, true, false);
|
||||
inject(
|
||||
initBrowser(),
|
||||
initLocation(),
|
||||
function($browser) {
|
||||
browserTrigger(link, 'click');
|
||||
expectNoRewrite($browser);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
it('should produce relative paths correctly when $location.path() is "/" when history enabled on old browser', function() {
|
||||
configureService('partial1', true, false, true);
|
||||
inject(
|
||||
initBrowser(),
|
||||
initLocation(),
|
||||
function($browser, $location) {
|
||||
$location.path('/');
|
||||
browserTrigger(link, 'click');
|
||||
expectRewriteTo($browser, 'http://host.com/base/index.html#!/partial1');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
it('should rewrite abs link to hashbang url when history enabled on old browser', function() {
|
||||
configureService('/base/link?a#b', true, false);
|
||||
inject(
|
||||
|
||||
@@ -30,6 +30,12 @@ describe('sanitizeUri', function() {
|
||||
expect(sanitizeImg(testUrl)).toBe('unsafe:javascript:doEvilStuff()');
|
||||
});
|
||||
|
||||
it('should sanitize javascript: urls with comments', function() {
|
||||
/* jshint scripturl:true */
|
||||
testUrl = "javascript:alert(1)//data:image/";
|
||||
expect(sanitizeImg(testUrl)).toBe('unsafe:javascript:alert(1)//data:image/');
|
||||
});
|
||||
|
||||
it('should sanitize non-image data: urls', function() {
|
||||
testUrl = "data:application/javascript;charset=US-ASCII,alert('evil!');";
|
||||
expect(sanitizeImg(testUrl)).toBe("unsafe:data:application/javascript;charset=US-ASCII,alert('evil!');");
|
||||
@@ -235,4 +241,4 @@ describe('sanitizeUri', function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -25,6 +25,8 @@ describe('linky', function() {
|
||||
toEqual('<a href="mailto:me@example.com">me@example.com</a>');
|
||||
expect(linky("send email to me@example.com, but")).
|
||||
toEqual('send email to <a href="mailto:me@example.com">me@example.com</a>, but');
|
||||
expect(linky("my email is \"me@example.com\"")).
|
||||
toEqual('my email is "<a href="mailto:me@example.com">me@example.com</a>"');
|
||||
});
|
||||
|
||||
it('should handle target:', function() {
|
||||
|
||||
Reference in New Issue
Block a user