Commit Graph

5758 Commits

Author SHA1 Message Date
Jeff Cross
dc5130c611 chore(docs): rearrange docs app search elements so close button is not first tab index 2014-10-01 23:05:36 -07:00
Jeff Cross
84912134d5 docs(changelog.md): update changelog for 1.3.0-rc.4 and 1.2.26 2014-10-01 21:24:01 -07:00
Peter Bacon Darwin
59cb9e8a77 chore(docs): show error 404 without partial failing
We can move the test back into the main describe as it no longer causes an
error message to be logged
2014-10-01 21:09:48 -07:00
Tobias Bosch
10644432ca fix(input): register builtin parsers/formatters before anyone else
Previously, builtin parsers/formatters for e.g. `input[date]`
or `input[number]` were added in the post linking phase to `ngModelController`,
which in most cases was after a custom formatter/parser was registered.

This commit registers builtin parsers/formatters already
in the pre linking phase. With that builtin
parsers run first, and builtin formatters run last.

Closes #9218
Closes #9358
v1.3.0-rc.4
2014-10-01 17:37:40 -07:00
Tobias Bosch
a0bfdd0d60 fix(input): correctly handle invalid model values for input[date/time/…]
Similar to `input[number]` Angular will throw if the model value
for a `input[date]` is not a `Date` object.
For `Invalid Date`s (dates whose `getTime()` is `NaN`) `input[date]`
will render an empty string.

Closes #8949
Closes #9375
2014-10-01 16:12:05 -07:00
Igor Minar
3624e3800f fix(ngView): use animation promises ensure that only one leave animation occurs at a time
the tracking depended on a local flag variable, which was susceptible to corruption due to
race conditions.

using promises ensures that the previousLeaveAnimation is nulled out only if it hasn't been
canceled yet.

Closes #9355
Closes #7606
Closes #9374
2014-10-01 15:19:29 -07:00
Jason Bedard
b1ee5386d5 perf(ngForm,ngModel): move initial addClass to the compile phase
Closes #8268
2014-09-30 21:45:41 -07:00
ltrillaud
ab80cd9066 fix(compile): sanitize srcset attribute
Applies similar sanitization as is applie to img[src] to img[srcset],
while adapting to the different semantics and syntax of srcset.
2014-09-30 16:32:58 -07:00
Maxi Ferreira
8199f4dbde docs(guide/forms): improve example
When explaining ng-model-options, there's no print of `user.data` to show
the difference between the default behaviour and updateOn: 'blur'
2014-09-30 14:46:22 -07:00
Brian Feister
313d7956e4 docs(minerr/unpr): note that ctrls cant depend on other ctrls 2014-09-30 14:36:08 -07:00
Tobias Bosch
b9479ee73b chore(ngCsp): add e2e tests
Also changes `connect:devserver` and `connect:testserver` to conditionally serve files with csp headers when the path contains `.csp` somewhere.

Closes #9136
Closes #9059
2014-09-30 14:10:19 -07:00
active-low
769a00dc86 docs(guide/concepts): improve readability 2014-09-30 12:56:45 -07:00
Adam Humphrey
6593c2371e docs(readme): fix formatting 2014-09-30 12:35:44 -07:00
thorn0
8b54524c07 docs($compile): fix a broken link 2014-09-30 12:33:01 -07:00
Justin Walsh
66bb5aa41c docs(guide/compiler): change span to block element in draggable example
The draggable example does not work as expected in Chrome (37.0.2062.124 m).
The span disappears when dragged beyond what appears to be a small area.
Changing the span to a block element (with a width of 65px) resolves this issue.
An alternative solution would be to change the span to a div.
2014-09-30 12:29:18 -07:00
thorn0
b186709003 docs($compile): add header to example 2014-09-30 11:40:48 -07:00
Caitlin Potter
a27d827c22 fix($compile): get $$observe listeners array as own property
Prevent accidentally treating a builtin function from Object.prototype as the binding object, and thus
preventing the compiler from throwing when using attribute binding names which match a property of the
Object prototype.

Closes #9343
Closes #9345
2014-09-30 13:05:09 -04:00
Caitlin Potter
a1648a76c0 docs(CHANGELOG.md): put <base> in codeblock
Prevent the tag from being processed (and not rendered). Thanks @davidlehn.

Closes #9331
2014-09-29 17:16:11 -04:00
Brian Ford
2bcd02dc1a fix(select): make ctrl.hasOption method consistent
Prior to this fix, options added to a select by ngOptions would not cause
`selectCtrl.hasOption` to return `true`

Closes #8761
2014-09-29 13:58:03 -07:00
Peter Bacon Darwin
b0033a44bd chore(npm-shrinkwrap): update to dgeni-packages 0.10.0 2014-09-29 21:56:22 +01:00
Julie Ralph
76b755f3cb chore(e2e): bump protractor to version 1.3.1 2014-09-29 10:15:49 -07:00
Lucas Galfaso
6303c3dcf6 fix($compile): Resolve leak with asynchronous compilation
Stop an asynchronous compilation when this is performed on an
already destroyed scope

Closes #9199
Closes #9079
Closes #8504
Closes #9197
2014-09-29 12:47:21 +01:00
Lucas Galfaso
cd2cfafcab refactor($scope): prevent multiple calls to listener on $destroy
Prevent isolated scopes from having listeners that get called
multiple times when on `$destroy`
2014-09-29 12:41:36 +01:00
Richard Littauer
86d33c5f9d docs(CONTRIBUTING.md): Added a not about type
It's important that we let people use the GitHub editing interface without being 100% strict about how to name the commit changes. Otherwise, it is basically a barrier to entry and highly discouraging for new people who may just be trying to fix a spelling error. Since it is possible for contributors to edit the commit message before merging it into master, for people who are new to the commit styling system, we should be lenient about minor infractions like forgetting to put docs: in front of a message. 

CF: https://github.com/angular-ui/bootstrap/pull/2635#issuecomment-57117579
2014-09-29 02:50:49 -07:00
Georgios Kalpakas
eb935e6be0 test($http): fix typo in spec name
'applyAapply' -> 'applyAsync'.

Closes #9323
2014-09-28 20:33:05 -04:00
Jason Bedard
b119251827 perf($rootScope): moving internal queues out of the Scope instances
Closes #9071
2014-09-27 08:19:15 -07:00
Jason Bedard
5572b40b15 refactor($parse): change 'this' to a $parse keyword instead of scope field
BREAKING CHANGE:
- $scope['this'] no longer exits on the $scope object
- $parse-ed expressions no longer allow chaining 'this' such as this['this'] or $parent['this']
- 'this' in $parse-ed expressions can no longer be overriden, if a variable named 'this' is put on the scope it must be accessed using this['this']

Closes #9105
2014-09-27 08:13:14 -07:00
Brian Iversen
4a6c7cf8ce docs(guide): update compiler guide with minor grammatical fixes
Minor changes to grammar. Changed sentence "But the declarative language
is also limited, since it does not allow you to teach the browser new syntax."
to now read "However, the declarative language is also limited, as it does not
allow you to teach the browser new syntax."
However is a less informal start to a sentence, and replacing "since"
correctly references extent/degree rather than comparison of time.
2014-09-26 17:16:23 -07:00
Victor Queiroz
27d12340d9 docs(guide): update directive guide to not imply ngView is part of core 2014-09-26 17:04:40 -07:00
Peter Bacon Darwin
fb0c77f0b6 fix($compile): connect transclude scopes to their containing scope to prevent memory leaks
Transcluded scopes are now connected to the scope in which they are created
via their `$parent` property. This means that they will be automatically destroyed
when their "containing" scope is destroyed, without having to resort to listening
for a `$destroy` event on various DOM elements or other scopes.

Previously, transclude scope not only inherited prototypically from the scope from
which they were transcluded but they were also still owned by that "outer" scope.
This meant that there were scenarios where the "real" container scope/element was
destroyed but the transclude scope was not, leading to memory leaks.

The original strategy for dealing with this was to attach a `$destroy` event handler
to the DOM elements in the transcluded content, so that if the elements were removed
from the DOM then their associated transcluded scope would be destroyed.

This didn't work for transclude contents that didn't contain any elements - most
importantly in the case of the transclude content containing an element transclude
directive at its root, since the compiler swaps out this element for a comment
before a destroy handler could be attached.

BREAKING CHANGE:

`$transclude` functions no longer attach `$destroy` event handlers to the
transcluded content, and so the associated transclude scope will not automatically
be destroyed if you remove a transcluded element from the DOM using direct DOM
manipulation such as the jquery `remove()` method.

If you want to explicitly remove DOM elements inside your directive that have
been compiled, and so potentially contain child (and transcluded) scopes, then
it is your responsibility to get hold of the scope and destroy it at the same time.

The suggested approach is to create a new child scope of your own around any DOM
elements that you wish to manipulate in this way and destroy those scopes if you
remove their contents - any child scopes will then be destroyed and cleaned up
automatically.

Note that all the built-in directives that manipulate the DOM (ngIf, ngRepeat,
ngSwitch, etc) already follow this best practice, so if you only use these for
manipulating the DOM then you do not have to worry about this change.

Closes #9095
Closes #9281
2014-09-26 21:38:17 +01:00
Peter Bacon Darwin
6417a3e9eb feat(Scope): allow the parent of a new scope to be specified on creation
This enables us to place transclude scopes more accurately in the scope hierarchy.
2014-09-26 21:38:02 +01:00
Caitlin Potter
07e3abc7dd feat($compile): optionally get controllers from ancestors only
Implement option to strengthen require '^' operator, by adding another '^'.

When a second '^' is used, the controller will only search parent nodes for the
matching controller, and will throw or return null if not found, depending on
whether or not the requirement is optional.

Closes #4518
Closes #4540
Closes #8240
Closes #8511
2014-09-26 16:32:26 -04:00
Peter Bacon Darwin
b9df121655 chore(docs): fix links to github
Closes https://github.com/angular/code.angularjs.org/issues/13
2014-09-26 20:51:55 +01:00
Brian Ford
b5bb4a986a docs(guide/accessibility): explain ngAria 2014-09-26 12:02:02 -07:00
Michał Gołębiowski
8202c4dcea chore(Angular): drop support for Opera < 15
Closes #8589
2014-09-26 11:32:11 -07:00
Leonardo Zizzamia
2c8b464852 perf(benchmark): add ngBindOnce benchmarks to largetable-bp 2014-09-26 10:04:29 -07:00
Sandeep Panda
a192c41ddc docs(guide/index): add book AngularJS: Novice to Ninja
I wrote a book on AngularJS (AngularJS: Novice to Ninja).

Closes #9293
2014-09-26 12:27:52 -04:00
Georgios Kalpakas
a8fe2cc345 test(input): test that number validates with unspecified viewValue
Adds an additional test verifying that a number which is not required will validate successfully
when ngModelCtrl.$validate() is called. Before 92f05e5 landed, this would have failed because of
a parse error.

Closes #9193
2014-09-25 09:53:45 -04:00
Peter Bacon Darwin
e522c25fd4 chore(docs): remove unused code 2014-09-25 05:43:20 +01:00
Peter Bacon Darwin
5dbc2d65f3 chore(docs): improve logo rendering performance 2014-09-25 05:32:12 +01:00
Peter Bacon Darwin
27300072d1 chore(protractor): annotate $animate to allow tests to run under strict-di 2014-09-25 05:32:12 +01:00
Peter Bacon Darwin
7ffc247d0f chore(docs): minify javascript 2014-09-25 05:32:12 +01:00
Peter Bacon Darwin
8ab673d430 chore(docs): ensure DI annotations are in place 2014-09-25 05:31:14 +01:00
Caitlin Potter
b9e899c8b2 test(ngModel): rename test to better reflect what is being tested
I meant to do this in before 92f05e5a59 landed, sorry u_u
2014-09-24 18:04:37 -04:00
Caitlin Potter
92f05e5a59 fix(ngModel): do not parse undefined viewValue when validating
Previously, if a viewValue had not yet been set on the element, it could incorrectly produce a
parse error.

This change prevents the parsers from running if a view value has not yet been committed.

Closes #9106
Closes #9260
2014-09-24 18:00:20 -04:00
Peter Bacon Darwin
e81ae1464d chore(docs): show error 404 without partial failing
We can move the test back into the main describe as it no longer causes an
error message to be logged
2014-09-24 07:32:04 +01:00
Jeff Cross
de38899f74 docs(changelog): add release notes for 1.3.0-rc.3 v1.3.0-rc.3 2014-09-23 18:47:24 -07:00
Caitlin Potter
729c238e19 feat(input): support dynamic element validation
Interpolates the form and form control attribute name, so that dynamic form controls (such as those
rendered in an ngRepeat) will always have their expected interpolated name.

The control will be present in its parent form controller with the interpolated property name, and
this name can change when the interpolated value changes.

Closes #4791
Closes #1404
2014-09-23 16:03:53 -04:00
Jeff Cross
dc3de7fb7a feat($location): add ability to opt-out of <base/> tag requirement in html5Mode
This feature allows disabling Angular's requirement of using a <base/> tag
when using location in html5Mode, for applications that do not require
using $location in html5Mode in IE9. To accomplish this, the $locationProvider.html5Mode 
method has been changed to accept a definition object which can optionally set a 
requireBase property to false, removing the requirement of a <base> tag being present
when html5Mode is enabled.

BREAKING CHANGE: The $location.html5Mode API has changed to allow enabling html5Mode by
    passing an object (as well as still supporting passing a boolean). Symmetrically, the
    method now returns an object instead of a boolean value.

    To migrate, follow the code example below:

    Before:

    var mode = $locationProvider.html5Mode();

    After:

    var mode = $locationProvider.html5Mode().enabled;

Fixes #8934
2014-09-23 11:34:24 -07:00
Peter Bacon Darwin
ace40d5526 chore(docs): refactor the docs app search for better bootup time
This commit refactors how the search index is built. The docsSearch service
is now defined by a provider, which returns a different implementation of
the service depending upon whether the current browser supports WebWorkers
or now.

* **WebWorker supported**: The index is then built and stored in a new worker.
The service posts and receives messages to and from this worker to make
queries on the search index.

* **WebWorker no supported**: The index is built locally but with a 500ms
delay so that the initial page can render before the browser is blocked as
the index is built.

Also the way that the current app is identified has been modified so we can
slim down the js data files (pages-data.js) to again improve startup time.

Closes #9204
Closes #9203
2014-09-23 18:58:45 +01:00