Commit graph

2130 commits

Author SHA1 Message Date
Valentyn Shybanov
dfccdd5b86 docs($location): document $location's events
Closes #1569
Closes #4446
2013-10-26 20:20:42 +01:00
rjferguson21
28ab4b600a docs($q): promises are no longer automatically unwrapped, by default
Although it is still possible to turn this on, the feature is deprecated and it is
best to remove this mention completely here.

Closes #4632
2013-10-26 19:29:27 +01:00
thorn0
9f0d4085e7 docs(Angular.js): angular.equals calls itself recursively on objects
Closes #4622
2013-10-26 18:57:59 +01:00
mgechev
af34a4a2c0 docs(http): add missing brace in the 2nd interceptors example
Closes #4621
2013-10-26 18:53:41 +01:00
David Bennett
31ebeeef7d docs(ngForm): ensure correct attribute name in usage example
Closes #4611
2013-10-26 18:18:53 +01:00
Caio Cunha
0a84739776 docs($rootScope): added $eval locals parameter documentation
Added documentation for `locals` parameter of `$eval` method.
2013-10-25 23:53:15 -04:00
Igor Minar
79223eae50 fix($compile): attribute bindings should not break due to terminal directives
Recently we changed the priority of attribute interpolation directive to -100
to ensure that it executes early in the post linking phase. This causes issues
with when terminal directives are placed on elements with attribute bindings
because the terminal directive will usually have 0 or higher priority which
results in attr interpolation directive not being applied to the element.

To fix this issue I'm switching the priority back to 100 and making moving the
binding setup into the pre-linking function.

This means that:

- terminal directives with priority lower than 100 will not affect the attribute
  binding
- if a directive wants to add or alter bindings it can do so in the pre-linking
  phase, as long as the priority of this directive is more than 100
- all post-linking functions will execute after the attribute binding has been
  set up
- all pre-linking functions with directive priority lower than 100 will execute
  after the attribute bindings have been setup

BREAKING CHANGE: the attribute interpolation (binding) executes as a directive
with priority 100 and the binding is set up in the pre-linking phase. It used
to be that the priority was -100 in rc.2 (100 before rc.2) and that the binding
was setup in the post-linking phase.

Closes #4525
Closes #4528
Closes #4649
2013-10-25 14:19:58 -07:00
BrainCrumbz
9bf9c236cf docs(compile): fix typo in 'Attributes' description
Closes #4589
2013-10-25 22:16:35 +01:00
Balázs Suhajda
924abdae9f docs(ngIf): fix typo
Closes #4512
2013-10-25 22:06:37 +01:00
Sam Dornan
e8a3569be6 docs(ngClass): fix typo
Closes #4471
2013-10-24 23:22:36 +01:00
Wesley Cho
459e85bfea docs(rootScope): add example of using a listener function for $watch
Closes #4451
2013-10-24 23:13:30 +01:00
Pete Bacon Darwin
82dec9b81e style($route): fix line length 2013-10-24 22:36:40 +01:00
Matias Niemelä
76b628bcb3 fix($animate): skip unnecessary addClass/removeClass animations
Skip addClass animations if the element already contains the class that is being
added to element. Also skip removeClass animations if the element does not contain
the class that is being removed.

Closes #4401
Closes #2332
2013-10-24 17:35:57 -04:00
basarat
46d396df72 docs(ngModelController): $parent can help isolate scope directives 2013-10-24 22:26:39 +01:00
Josh Schumacher
3b046c9eaa docs($routeProvider): document route.resolve rejection
Add documentation that the $routeChangeError event is fired when a
route resolve promise is rejected

Closes #4447
2013-10-24 22:17:50 +01:00
wiebl
3c05e36e79 docs(select): fix typo
Closes #4433
2013-10-24 22:12:51 +01:00
Nicolas Brugneaux
93132b96bf docs(ngBindHtml): add example
Closes #4427
2013-10-24 22:11:56 +01:00
Igor Minar
faf5b980da fix($compile): instantiate controlers when re-entering compilation
When we re-enter compilation either due to async directive templates or element transclude directive
we need to keep track of controllers to instantiate during linking.

This piece of info was missing when re-entering compilation and that's what this commit fixes.

I also reordered the properties in the previousCompileContext object.

Closes #4434
Closes #4616
2013-10-24 13:54:15 -07:00
Dave Peticolas
e57d5b89ca docs(ngNonBindable): fix punctuation
Closes #4424
2013-10-24 21:08:42 +01:00
Pete Bacon Darwin
e690eaae53 docs($provide): Fix typo
Closes #4420
2013-10-24 20:54:26 +01:00
Tyler McGinnis
bf29cbc53f docs(ngController): do not attach a controller twice
A common mistake for beginners is to attach a controller in both the
$routeProvider and also in the html document using the ng-controller
directive. This change highlights this, to help prevent developers from
doing so in the future.

Closes #4409
2013-10-24 20:42:02 +01:00
Dmitry Shirokov
4b653aeac1 fix(input): keep track of min/max attars on-the-fly
Now input[type=button] keeps track of both min and max attrs even if they change over time.
2013-10-24 09:19:55 -04:00
Matias Niemelä
269bc7e51f chore(docs): fix jsHint errors with long lines 2013-10-23 17:44:37 -04:00
Brian Ford
e69c287293 docs(guide/directive,guide/compiler,): drastically improve 2013-10-23 14:17:27 -07:00
Matias Niemelä
32ab648c79 chore(ngMocks): shorten the length of the description line to avoid jsHint errors 2013-10-23 17:06:14 -04:00
Matias Niemelä
a7e12b7959 feat(docs): provide index pages for each angular module 2013-10-23 17:00:12 -04:00
Matias Niemelä
3f568b22f9 fix(ngView): ensure the new view element is placed after the old view element
Closes #4362
2013-10-23 10:30:45 -07:00
Matias Niemelä
2623de1426 fix($animate): ensure animations work properly when the $rootElement is being animated
Closes #4397
Closes #4231
2013-10-23 07:26:41 -04:00
Matias Niemelä
f5289fe84f fix($animate): only cancel class-based animations if the follow-up class contains CSS transition/keyframe animation code
Closes #4463
Closes #3784
2013-10-23 07:08:03 -04:00
Vojta Jina
f2fab49830 style: make jshint happy 2013-10-22 15:32:41 -07:00
Pete Bacon Darwin
934a95d3ef chore(grunt): add jshint tasks 2013-10-22 15:32:40 -07:00
tigbro
a86cf20e67 fix: don't inline css in csp mode.
Also add `angular-csp.css` to the resulting build.
2013-10-22 15:21:23 -07:00
Grzegorz Lachowski
b9557b0a86 fix(ngAnimate): fix cancelChildAnimations throwing exception
fix ngAnimate throwing exception in cancelChildAnimations on deletion of
element (ngAnimate's leave decorator) of repeated element when using
ng-include on this element.

Closes #4548
2013-10-22 15:09:52 -04:00
Igor Minar
280e33d22a docs(ngCsp): pretty-format docs 2013-10-21 17:39:05 -07:00
Igor Minar
08f376f2ea fix(csp): fix csp auto-detection and stylesheet injection
When we refactored , we broke the csp mode because the previous implementation
relied on the fact that it was ok to lazy initialize the .csp property, this
is not the case any more.

Besides, we need to know about csp mode during bootstrap and avoid injecting the
stylesheet when csp is active, so I refactored the code to fix both issues.

PR #4411 will follow up on this commit and add more improvements.

Closes #917
Closes #2963
Closes #4394
Closes #4444

BREAKING CHANGE: triggering ngCsp directive via `ng:csp` attribute is not
supported any more. Please use data-ng-csp instead.
2013-10-18 17:33:53 -07:00
Vojta Jina
14438058da docs: correct broken links
This also contains some whitespace corrections by my editor.
2013-10-18 15:35:41 -07:00
Vojta Jina
c22adbf160 fix($injector): allow a constructor function to return a function
This change makes `$injector.instantiate` (and thus `$provide.service`) to behave the same as native
`new` operator.
2013-10-18 15:26:51 -07:00
Igor Minar
dba566a96d docs($rootScope): better document infinite digest and ttl 2013-10-15 11:28:47 -07:00
Chirayu Krishnappa
6d324c76f0 fix($parse): check function call context to be safe
Closes #4417
2013-10-15 06:43:19 -07:00
Igor Minar
08cdd77c28 docs: add missing priority documentation for structural directives 2013-10-14 09:53:32 -07:00
Tyler McGinnis
a780df8779 docs(ngInit): fix typo
Closes #4384
2013-10-14 07:40:57 +01:00
Pete Bacon Darwin
977b482b0b docs(ngNonBindable): improve description
Closes #4391
2013-10-14 07:20:31 +01:00
Dave Peticolas
e79a20e1ca docs(booleanAttrs): improve grammar and clarity
Closes #4392
2013-10-14 07:12:20 +01:00
Matias Niemelä
cd216c4c30 fix($animate): ensure that a timeStamp is created if not provided by the browser event
Firefox and (sometimes) Opera may not provide a timeStamp value in their event when passed
to the event handler. This may cause animations not to close properly. This fix will automatically
create a timeStamp value for the event in this situation when missing.

Closes #3053
2013-10-12 19:52:47 -04:00
Igor Minar
63c5334c84 fix($compile): abort compilation when duplicate element transclusion
Issue an error and abort compilation when two directives that ask for transclusion are found
on a single element. This configuration is not supported and we previously failed to issue
the error because in the case of element transclusion the compilation is re-started and this
caused the compilation context to be lost.

The ngRepeat directive has been special-cased to bypass this warning because it knows how to
handle this scenario internally.

This is not an ideal solution to the problem of multiple transclusions per element, we are
hoping to have this configuration supported by the compiler in the future. See #4357.

Closes #3893
Closes #4217
Closes #3307
2013-10-11 17:12:24 -07:00
Igor Minar
b7af76b4c5 fix(directives): correct priority of structural directives
BREAKING CHANGE: the priority of ngRepeat, ngSwitchWhen, ngIf,
ngInclude and ngView has changed. This could affect directives that
explicitly specify their priority.

In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView
work together in all common scenarios their directives are being
adjusted to achieve the following precendence:

Directive        | Old Priority | New Priority
=============================================
ngRepeat         | 1000         | 1000
---------------------------------------------
ngSwitchWhen     | 500          | 800
---------------------------------------------
ngIf             | 1000         | 600
---------------------------------------------
ngInclude/ngView | 1000         | 400
2013-10-11 17:12:24 -07:00
Igor Minar
4357da8575 fix($compile): make order directives w/ same priority deterministic
Array.prototype.sort is speced out to be as potentionally unstable sort,
which is how it's implemented in FF and IE. This has caused the order
of directives with the same priority to vary between browsers.

For consistency sake, we now consider directive name and registration,
order when determining the order of directives with the same priority.

Note: it is still possible to get into a situation when the directive
order is underministic - when source files are loaded asynchronously
in non-deterministic order and there are are directives registered
with the same name and priority, the order in which they will be applied
will depend on the file load order.
2013-10-11 17:12:24 -07:00
Igor Minar
83fbaa54f1 style: strip white space from files 2013-10-11 17:12:24 -07:00
Igor Minar
9f4d99f4ea chore($compile): remove dead code 2013-10-11 17:12:23 -07:00
Hack Reactor Students
3205166d80 docs(ngAnimate): fix typos
Closes #4375
2013-10-11 13:34:00 +01:00