Commit graph

3601 commits

Author SHA1 Message Date
Matias Niemelä
947a44d1ee chore(docs): specify how ngClass deals with natural CSS transitions 2013-11-06 18:11:59 -05:00
Jeff Cross
eb51b024c9 fix(docModuleComponents): implement anchor scroll when content added
When navigating to URLs such as
docs.angularjs.org/api/ng#filter, the browser
was not able to navigate to the named anchor,
"filter," because the anchor did not yet exist
in the DOM.

This fix uses the $anchorScroll service
to automatically scroll to the right place when
the content has been added to the page.

Fixes #4703
2013-11-06 10:24:22 -08:00
Brian Ford
56d0917799 docs(guide/directive): link to directives API from the top of the page 2013-11-06 09:50:56 -08:00
Brian Ford
c1260716de chore(ngdoc): add dynamic anchors to anchor list
Fixes some warnings during docs generation.

Closes #4673
2013-11-06 09:32:09 -08:00
Brian Ford
5614fd283a docs(guide/providers): add providers documentation 2013-11-06 08:47:06 -08:00
Jeff Cross
da344daa40 fix(ngView): only run anchorScroll after animation is done 2013-11-06 00:14:11 -08:00
Jeff Cross
6fb191570e fix(ngMock): throw more descriptive errors for $animate.flushNext() 2013-11-06 00:14:11 -08:00
Pete Bacon Darwin
d378f5500a fix(ngInclude): only run anchorScroll after animation is done
We need to wait until animations have added the content to the document before
trying to `autoscroll` to anchors that may have been inserted.

Fixes #4723
2013-11-06 00:14:11 -08:00
Matias Niemelä
9470080762 fix($animate): only apply the fallback property if any transition animations are detected 2013-11-06 02:01:19 -05:00
Matias Niemelä
aba0fe6830 chore(docs): refactor/improve new CSS transition code in examples 2013-11-05 21:21:18 -08:00
Matias Niemelä
b1d4d580e5 chore(docs): update $animate and ngAnimate docs 2013-11-05 21:21:17 -08:00
Matias Niemelä
9d69a0a7c7 feat($animate): ensure CSS transitions can work with inherited CSS class definitions
BREAKING CHANGE

ngAnimate addClass / removeClass animations are now applied right away. This means
that as soon as the animation starts the class will be added (addClass) or removed
(removeClass) to the element being animated instead of after the -add-active /
-remove-active animations are completed. This allows for animations outside of
ngAnimate to not conflict with $animate.

This commit introduces beforeAddClass and beforeRemoveClass animation event functions and
executes any addClass and removeClass event functions AFTER the class has been added or
removed (this is opposite functionality of how ngAnimate used to work when performing
JS-enabled animations addClass / removeClass animations). If your animation code relies on
any animations being performed prior to the class change then simply use the new
beforeAddClass and beforeRemoveClass animation event functions.

Finally, when animating show and hide animations using CSS transitions or keyframe animations,
ng-hide-remove doesn't require `display:block!important` for ng-hide-add anymore.
2013-11-05 21:15:59 -08:00
Matias Niemelä
7d2d2575a2 chore(animateSpec): provide meaningful CSS class names in animation tests 2013-11-05 21:46:07 -05:00
Matias Niemelä
b89584db10 fix($animate): avoid hanging animations if the active CSS transition class is missing
Closes #4732
Closes #4490
2013-11-05 21:45:36 -05:00
Matias Niemelä
41a2d5b30f fix($animate): ensure staggering animations understand multiple delay values 2013-11-05 21:44:25 -05:00
Matias Niemelä
e53ff431e1 fix($animate): ensure the active class is not applied if cancelled during reflow
Closes #4699
2013-11-05 21:44:02 -05:00
Matias Niemelä
974b6d4a5b chore($sniffer): make msie variable public
The msie variable is a global variable used within the ng core which contains the
version number for the current Internet Explorer browser that is rendering the
application. Other modules outside of the ng core could make use of this variable
instead of having to rollout duplicate detection code. This code makes it easy to
reuse this simple property within the $sniffer service.
2013-11-05 21:43:31 -05:00
Matias Niemelä
952fea69fb chore(ngAnimate): ensure elapsedTime values are in seconds and millseconds 2013-11-05 21:42:42 -05:00
Pete Bacon Darwin
0fca288224 chore(grunt): add test:docsgen to ci checks 2013-11-05 21:22:04 +00:00
Pete Bacon Darwin
d4493fda2c fix(ngdocs): create mock Doc objects correctly 2013-11-05 21:20:46 +00:00
Pete Bacon Darwin
4c8fa35324 fix(ngdocs): shortDescription() should not error if no description 2013-11-05 21:16:52 +00:00
Michal Bendowski
e196413df6 docs(guide/directive): fix transclusion example
The example about transclusion and scopes worked only because the order of `scope` and `element`
arguments is wrong, which means that the `name' property of the scope is not really being updated.
To really work, the directive has to define its own scope, either a new child scope or, as is more
common with transclusion, an isolated scope.

Closes #4774
2013-11-05 13:38:09 +00:00
G Lormeau
727b232fb2 docs(guide): add SEO4Ajax to the SEO tools list
Closes #4748
2013-11-04 22:34:11 +00:00
Tim Graham
6dcdb4e306 docs(input): fix typo
Closes #4734
2013-11-04 22:31:51 +00:00
Dmitry Kichenko
8cfaeb0e82 docs($http): note that default $http headers can be overridden
Closes #4750
2013-11-04 22:28:34 +00:00
joshbowdoin
159a63f538 docs(guide/understanding-controllers): fix typo in example
Broken - $scope.spicy = 'very';
Works - $scope.spice = 'very';

Closes #4752
2013-11-04 22:24:18 +00:00
Jesse Palmer
5b1c972723 docs(overview): improve readability
Inserted a couple of line breaks to increase readability.

Closes #4756
2013-11-04 22:23:02 +00:00
granteagon
c82058ad57 docs($log): add the word "safely" to clarify
I was reading the doc and had to read the code to be sure it was safe.  Spelling it out seems easier.

Closes #4760
2013-11-04 22:21:49 +00:00
Brian Ford
a92b419551 chore(docs): fix ordering of docs in the guide 2013-11-04 11:43:41 -08:00
Igor Minar
8f989d652f fix(ngModel): deregister from the form on scope not DOM destruction
Due to animations, DOM might get destroyed much later than scope and so the element $destroy event
might get fired outside of $digest, which causes changes to the validation model go unobserved
until the next digest. By deregistering on scope  event, the deregistration always happens
in $digest and the form validation model changes will be observed.

Closes #4226
Closes #4779
2013-11-04 10:35:51 -08:00
Igor Minar
9483373c33 fix(ngIf): destroy child scope when destroying DOM 2013-11-04 10:35:51 -08:00
Igor Minar
c6923d2df4 style: remove ws 2013-11-04 10:35:51 -08:00
Brian Ford
de2cced192 docs(guide/contribute): remove redundancy and link to CONTRIBUTING.md 2013-11-04 10:35:21 -08:00
Jordan Klassen
84166029ec docs($parse): Fix typo 2013-11-04 09:59:31 -08:00
Freek Wielstra
8d4e3fdd31 docs($location): update paramValue description for search()
search() supports an array for paramValue, but this is not described in the docs.
2013-11-02 21:40:15 -07:00
Tobias Bosch
9a828738cd fix(ngEventDirectives): parse expression only once during compile phase. 2013-10-31 12:56:49 -07:00
Chirayu Krishnappa
3d6a89e888 feat($parse): secure expressions by hiding "private" properties
BREAKING CHANGE:
This commit introduces the notion of "private" properties (properties
whose names begin and/or end with an underscore) on the scope chain.
These properties will not be available to Angular expressions (i.e. {{
}} interpolation in templates and strings passed to `$parse`)  They are
freely available to JavaScript code (as before).

Motivation
----------
Angular expressions execute in a limited context.  They do not have
direct access to the global scope, Window, Document or the Function
constructor.  However, they have direct access to names/properties on
the scope chain.  It has been a long standing best practice to keep
sensitive APIs outside of the scope chain (in a closure or your
controller.)  That's easier said that done for two reasons: (1)
JavaScript does not have a notion of private properties so if you need
someone on the scope chain for JavaScript use, you also expose it to
Angular expressions, and (2) the new "controller as" syntax that's now
in increased usage exposes the entire controller on the scope chain
greatly increaing the exposed surface.  Though Angular expressions are
written and controlled by the developer, they (1) typically deal with
user input and (2) don't get the kind of test coverage that JavaScript
code would.  This commit provides a way, via a naming convention, to
allow publishing/restricting properties from controllers/scopes to
Angular expressions enabling one to only expose those properties that
are actually needed by the expressions.
2013-10-30 17:01:51 -07:00
Brian Ford
5b620653f6 chore($compile): remove special case for ngIf and ngRepeat 2013-10-30 16:21:02 -07:00
Brian Ford
6578bd0c82 chore: move getBlockElements to Angular.js 2013-10-30 16:21:02 -07:00
Brian Ford
e19067c9bb fix(ngIf): ngIf removes elements dynamically added to it
When using ngIf with ngInclude on the same element, ngIf previously did not remove
elements added by ngInclude. Similarly, when using ngIfStart/End, ngIf will miss
elements added between the start/end markers added after ngIf is linked.

This commit changes the behavior of ngIf to add a comment node at the end of its
elements such that elements between the starting comment and this ending comment
are removed when ngIf's predicate does not hold.
2013-10-30 16:21:02 -07:00
Martin Probst
9d0a69772c feat(Angular.js): add externs file for Closure Compiler
This adds an (incomplete) externs file for use with the Closure Compiler. Users
can pass this as -extern to the compiler pass to get type checking and protect
their AngularJS use against property renaming in advanced compilation mode.
2013-10-30 15:15:03 -07:00
Pete Bacon Darwin
117de8e6e2 docs(api): fix broken links 2013-10-30 21:24:20 +00:00
Fred Sauer
2ae29b1ce3 docs(api): fix broken links
Closes #4705
2013-10-30 21:16:38 +00:00
Adam Bowen
89a67ca77c docs(guide/injecting-services): fix indentation in example
Closes #4714
2013-10-30 21:08:33 +00:00
Pete Bacon Darwin
627f9ba091 docs($route): split over-length line 2013-10-30 21:03:10 +00:00
Renan Ivo
e53e2c2d58 docs(tutorial): add instructions to install karma plugins 2013-10-30 21:00:11 +00:00
Andrew Jackson
217feda041 docs($route): change example module name
The name of the example module is `ngView`, which might cause needless confusion.
Changed name to `ngViewExample`, which should make it clearer.

Closes #4702
2013-10-30 20:58:10 +00:00
El Juli
6e77f80827 docs(guide/e2e-testing): fix typo
Closes #4700
2013-10-30 20:56:38 +00:00
JoeLeCodeur
d355b6c48e docs(api): improve grammar
Closes #4690
2013-10-30 20:55:43 +00:00
Pete Bacon Darwin
a1c9a41639 docs(CONTRIBUTING.md): add more info for contributors
Closes #4636
2013-10-30 20:53:34 +00:00