Commit Graph

4631 Commits

Author SHA1 Message Date
Joseph Orbegoso Pea
b63fd11800 docs(guide/scope): small fixes 2014-04-03 16:09:10 -07:00
Martin Jezek
c369563818 docs(tutorial): fix linked files to bower_components folder
Closes #6960
2014-04-03 16:01:49 -07:00
Brian Ford
8e2c62ae9d chore(CHANGELOG.md): add missing 1.2.15 changelog v1.3.0-beta.5 2014-04-03 14:46:15 -07:00
Brian Ford
cb6b976851 chore(CHANGELOG.md): add missing changes to 1.2.16 release 2014-04-03 14:43:41 -07:00
Brian Ford
7227f1a479 chore(CHANGELOG.md): add changelog for 1.2.16 and 1.3.0-beta.5 2014-04-03 14:39:12 -07:00
Matias Niemelä
1cb8584e84 fix($animate): insert elements at the start of the parent container instead of at the end
With 1.2.x, `$animate.enter` and `$animate.move` both insert the element at the end of the provided
parent container element when only the `parent` element is provided. If an `after` element is provided
then they will place the inserted element after that one. This works fine, but there is no way to
place an item at the top of the provided parent container using these two APIs.

With this change, if the `after` argument is not specified for either `$animate.enter` or `$animate.move`,
the new child element will be inserted into the first position of the parent container element.

Closes #4934
Closes #6275

BREAKING CHANGE: $animate will no longer default the after parameter to the last element of the parent
container. Instead, when after is not specified, the new element will be inserted as the first child of
the parent container.

To update existing code, change all instances of `$animate.enter()` or `$animate.move()` from:

`$animate.enter(element, parent);`

to:

`$animate.enter(element, parent, angular.element(parent[0].lastChild));`
2014-04-03 17:07:43 -04:00
Matias Niemelä
c67bd69c58 fix($animate): ensure the CSS driver properly works with SVG elements
The default CSS driver in ngAnimate directly uses node.className when reading
the CSS class string on the given element. While this works fine with standard
HTML DOM elements, SVG elements have their own DOM property. By switching to use
node.getAttribute, ngAnimate can extract the element's className value without
throwing an exception.

When using jQuery over jqLite, ngAnimate will not properly handle SVG elements
for an animation. This is because jQuery doesn't process SVG elements within it's
DOM operation code by default. To get this to work, simply include the jquery.svg.js
JavaScript file into your application.

Closes #6030
2014-04-03 15:47:16 -04:00
Igor Minar
71c11e96c6 fix(Scope): revert the __proto__ cleanup as that could cause regressions
When a async task interacts with a scope that has been destroyed already
and if it interacts with a property that is prototypically inherited from
some parent scope then resetting proto would make these inherited properties
inaccessible and would result in NPEs
2014-04-03 12:40:22 -07:00
Brian Ford
c9677920d4 fix(ngClass): handle ngClassOdd/Even affecting the same classes
The basic approach is to introduce a new elt.data() called $classCounts that keeps
track of how many times ngClass, ngClassEven, or ngClassOdd tries to add a given class.
The class is added only when the count goes from 0 to 1, and removed only when the
count hits 0.

To avoid duplicating work, some of the logic for checking which classes
to add/remove move into this directive and the directive calls $animate.

Closes #5271
2014-04-03 11:55:54 -07:00
Andreas Krummsdorf
83e36db85d style(loader.js): correct JSDoc tags of the params of the function module(name, requires, configFn)
This will improve the hints for IDE's which support the Google Closure Compiler (e.g. Webstorm)
2014-04-03 09:37:23 -07:00
Igor Minar
d64d41ed99 fix(Scope): more scope clean up on $destroy to minimize leaks
Due to a known V8 memory leak[1] we need to perform extra cleanup to make it easier
for GC to collect this scope object.

V8 leaks are due to strong references from optimized code (fixed in M34) and inline
caches (fix in works). Inline caches are caches that the virtual machine builds on the
fly to speed up property access for javascript objects. These caches contain strong
references to objects so under certain conditions this can create a leak.

The reason why these leaks are extra bad for Scope instances is that scopes hold on
to ton of stuff, so when a single scope leaks, it makes a ton of other stuff leak.

This change removes references to objects that might be holding other big
objects. This means that even if the destroyed scope leaks, the child scopes
should not leak because we are not explicitly holding onto them.

Additionally in  theory we should also help make the current scope eligible for GC
by changing properties of the current Scope object.

I was able to manually verify that this fixes the problem for the following
example app: http://plnkr.co/edit/FrSw6SCEVODk02Ljo8se

Given the nature of the problem I'm not 100% sure that this will work around
the V8 problem in scenarios common for Angular apps, but I guess it's better
than nothing.

This is a second attempt to enhance the cleanup, the first one failed  and was
reverted because it was too aggressive and caused problems for existing apps.
See: #6897

[1] V8 bug: https://code.google.com/p/v8/issues/detail?id=2073

Closes #6794
Closes #6856
Closes #6968
2014-04-03 00:25:01 -07:00
Stephanie Nacios Staub
ba48797bb0 docs(tutorial): update instructions for running tests in step 2
Fixing outdated instructions on how to run the test

Closes #6972
2014-04-03 01:01:39 -04:00
Igor Minar
f9eb324716 chore(rootScopeSpec): fix a typo in spec description 2014-04-02 21:24:40 -07:00
Yiling Lu
862e587b46 docs(tutorial): remove reference to old webserver script
script/web-server.js is not present anymore. This doc might be referencing a previous version of the
code. Currently the only way to start the server seems to be using "npm start".

Closes #6966
2014-04-02 23:59:25 -04:00
Jonathan Woodard
6cd6ec62fd docs(guide/bootstrap): remove extra call to angular.module()
There was an extra call to angular.module() not being used in 'getter' mode. While this doesn't
break the demo app, it does look kind of weird, so lets toss it.

Closes #6969
2014-04-02 23:55:18 -04:00
Tobias Bosch
549166740b docs(ngForm): clarify the purpose of ngForm
Related to #6704 and #2513.
2014-04-02 17:23:13 -07:00
Alexander Harding
2e3a972b32 test($compile): add tests for <option> or <optgroup> tags as root template nodes 2014-04-02 19:40:16 -04:00
Caitlin Potter
ddb8081982 refactor(jqLite): make HTML-parsing constructor more robust
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5
spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around
this in the HTML compiler.

This change refactors these hacks by simplifying them, and placing them in jqLite rather than in
$compile, in order to better support these things, and simplify code.

While the new jqLite constructor is still not even close to as robust as jQuery, it should be more
than suitable enough for the needs of the framework, while adding minimal code.

Closes #6941
Closes #6958
2014-04-02 19:40:16 -04:00
Pascal Precht
ccfa72dfa1 docs(guide): fix link in "Complementary libraries" section
the link to `angular-translate` is outdated. this commit fixes it.
2014-04-02 16:07:58 -07:00
Tero Parviainen
7914d3463b fix($parse): mark constant unary minus expressions as constant
Previously, constant numbers with a unary minus sign were not treated as constants. This fix corrects
this behaviour, and may provide a small performance boost for certain applications, due to constant
watches being automatically unregistered after their first listener call.

Closes #6932
2014-04-02 10:05:45 -04:00
Julie
10110bc3f7 docs(tutorial): update tutorial steps to discuss protractor
Closes #6940
2014-04-02 08:30:52 -04:00
b9chris
0ed0207dfb docs($location): fix link to Developer Guide for "Using $location"
Closes #6946
2014-04-02 08:08:00 -04:00
Igor Minar
6621adb6bb revert: fix(Scope): aggressively clean up scope on $destroy to minimize leaks
This reverts commit f552f25171.

The commit is causing regressions.

Closes #6897
2014-04-01 16:39:51 -07:00
Peter Bacon Darwin
789328de9b docs(tutorial): update to match changes to phonecat 2014-04-01 18:21:47 +01:00
Peter Bacon Darwin
14a2142484 docs(css): ensure all type-hints have a background color
If the type of a type-hint was not recognized, say a "Promise", then
the background color was left as white.  Given that the default
foreground color is also white, this meant that such type-hints were
invisible.

Closes #6934
2014-04-01 12:00:37 +01:00
Peter Bacon Darwin
2a4f92ee99 chore(grunt): add jscs task to test task
It is too easy to forget to check jscs for things like trailing whitespace
before pushing commits, such as simple doc changes.  This then breaks the
build and is messy.  Adding jscs to the test task gives people a slightly
better chance of catching these before pushing.
2014-04-01 11:52:23 +01:00
Joseph Orbegoso Pea
47384bc61b docs(guide/bootstrap): add note about ngApp and manual bootstrap 2014-03-31 16:57:49 -07:00
Bobdina
50eb3b2bd6 chore(build): make version-info.js run on windows
Replaced grep with match
Windows operating systems do not have grep by default

Closes #6912.
2014-03-31 16:18:11 -07:00
Matias Niemelä
876df04606 chore(CHANGELOG.md): add changelog for 1.3.0-beta.4 v1.3.0-beta.4 2014-03-28 17:43:17 -04:00
Matias Niemelä
908ab52b8d chore($animate): fix broken IE8 test 2014-03-28 14:13:35 -04:00
Matias Niemelä
ff5cf736e5 fix($animate): prevent cancellation timestamp from being too far in the future
Closes #6748
2014-03-28 12:25:50 -04:00
Igor Minar
f552f25171 fix(Scope): aggressively clean up scope on $destroy to minimize leaks
Due to a known V8 memory leak[1] we need to perform extra cleanup to make it easier
for GC to collect this scope object.

The theory is that the V8 leaks are due to inline caches which are caches
built on the fly to speed up property access for javascript objects.

By cleaning the scope object and removing all properties, we clean up ICs
as well and so no leaks occur.

I was able to manually verify that this fixes the problem for the following
example app: http://plnkr.co/edit/FrSw6SCEVODk02Ljo8se?p=preview

Given the nature of the problem I'm not 100% sure that this will work around
the V8 problem in scenarios common for Angular apps, but I guess it's better
than nothing.

[1] V8 bug: https://code.google.com/p/v8/issues/detail?id=2073

Closes #6794
Closes #6856
2014-03-27 21:04:25 -07:00
David I. Lehn
ec8e3957d2 docs($sce): fix typo.
Closes #6882
2014-03-27 20:27:50 -04:00
tamakisquare
d0df8c8946 docs(guide/filter): mention that filters can be used in directives
The doc mentions filters can be used in services and controllers but directives
aren't mentioned. This could lead to confusion for beginners.
2014-03-27 15:36:25 -07:00
Uri Goldshtein
b1d1cb6b7a docs(guide): add ngStorage to specific topics 2014-03-27 14:29:16 -07:00
jim lyndon
1d2414ca93 feat($http): add xhr statusText to completeRequest callback
Makes xhr status text accessible is $http success/error callback.
See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext

Closes #2335
Closes #2665
Closes #6713
2014-03-27 17:08:23 -04:00
ChrisRose
9f62d9d20b docs(filter/orderBy): fixed typo 2014-03-27 13:51:41 -07:00
Alex Sanford
08354ae1f7 docs(ngResource): clarify behaviour of $promise
Closes #6753
2014-03-27 16:31:52 -04:00
winkler1
3f9f1ad502 docs(ngShowHide): fix typo 'hrml' -> 'html'
Typo 'hrml'

Oops!

Closes #6874
2014-03-27 14:38:25 -04:00
Narretz
a2aa667777 docs(guide/scope): fix links to $interpolate
Closes #6877
2014-03-27 14:31:14 -04:00
William Bagayoko
0619e6f278 chore(docs): remove unneeded Bootstrap/jQuery files from distribution 2014-03-27 12:12:13 +00:00
wbyoko
545c62ab18 docs(error/index): add header
Closes #6849
2014-03-26 17:21:53 -07:00
wbyoko
e584111335 docs(misc/index): add header; general links
Closes #6850
2014-03-26 17:21:32 -07:00
wbyoko
5d9eccc2d4 docs(misc/started): add header
Closes #6851
2014-03-26 17:21:04 -07:00
Narretz
7a7e9f4047 docs($compile): add note about recursive compilation in templates
Closes #3079
Closes #6869
2014-03-26 16:42:39 -07:00
mrmrs
15859cf2c4 chore(docs): remove px declaration from x,y coordinates in header svg 2014-03-26 16:35:18 -07:00
Tobias Bosch
489d0d46d7 chore(release): simplify scripts so that they can be tested locally
The `git fetch --all` resulted in an error if in the local `.gitconfig`
a remote was configured that does not exist in the bower/code.anguarjs.org
repositories (e.g. "remote "upstream-prs"").
2014-03-26 15:55:09 -07:00
Tobias Bosch
33e6e0519c chore(release): remove after CDN script
The homepage (angularjs.org) and the docs now calculate the
current cdn version on every build, so there is no need
for an after-cdn script.
2014-03-26 15:55:09 -07:00
Tobias Bosch
aa249ae4a2 chore(release): calculate the cdnVersion on every build
The CDN version of angular is now calculated on every build,
by looking at the tags in angular/angular.js, sorting them
by semver and checking against ajax.googleapis.com which
one is available.
2014-03-26 15:55:09 -07:00
Tobias Bosch
d6d7fe4b07 chore(release): don't update phonecat and seed during a release
This is no more needed as phonecat and seed are using bower
now to get the angular version.
2014-03-26 15:55:08 -07:00