Commit graph

1966 commits

Author SHA1 Message Date
Hubert SABLONNIÈRE
3589f17824 fix(scenario): include "not " in error messages if test is inverted
Closes #3840
2013-09-18 12:16:42 +01:00
Chirayu Krishnappa
be0b485669 fix($parse): disallow access to window and dom in expressions 2013-09-17 18:15:49 -07:00
James
4aa9d2aa1e docs(input): clarify that contenteditable is an HTML5 attribute
Closes #3841
2013-09-17 11:43:53 +01:00
Jesse Palmer
62e6b4eeb6 docs(orderBy): fix typo in orderBy.js documentation
Closes #3838
2013-09-16 22:29:12 +01:00
Dave Peticolas
d206f3d2ad doc(api): fix grammar in a directive description
- Add missing words.
- Simplify text.
2013-09-16 16:36:05 +01:00
Dave Peticolas
bd478db770 docs(api): fix grammar in ngClick description
- Add missing word 'directive'.
- Add missing word 'an'.
2013-09-16 16:24:25 +01:00
Patrick Drechsler
3328d33ed0 docs(guide): fix typo in animation doc 2013-09-14 21:48:11 +01:00
Umur Kontacı
3b5fd53e2d docs(ngRoute): add missing parameter to $routeChangeError
The first parameter in $routeChangeError is the event object.

Closes #3986
2013-09-14 21:34:16 +01:00
Daniel Tse
da3dc5c5fe docs(ngSwitch): fix minor typo
Closes #3993
2013-09-13 21:56:53 +01:00
Ben Tesser
1b5217b1d6 docs($browser): add jsdoc tags and fix typo 2013-09-13 21:37:14 +01:00
Dean Sofer
a53d197db3 docs(ngController): rephrased the description for clarity 2013-09-13 14:23:32 +01:00
Pete Bacon Darwin
2bb0e1a604 docs($http): add examples when calling $http outside $apply
Closes #3996
2013-09-13 14:17:47 +01:00
Dang Nguyen Anh Khoa
b15686cb79 docs($http): explain why $http may not make the request immediately
I came across this issue today and after researching has found out this thread on so:
http://stackoverflow.com/questions/17039998/angular-not-making-http-requests-immediately.

It took me quite sometimes to figure out this so I hope the addition in documentation could save somebody else some times and frustration.
2013-09-13 13:41:32 +01:00
Gowtam Lal
aa3c54c73f fix(ngOptions): ignore object properties which start with $ 2013-09-13 12:48:19 +01:00
R. Merkert
21e9e8cf68 fix(ngSanitize): sanitizer should not accept <!--> as a valid comment
According to http://validator.w3.org/ , <!--> is not a valid comment
and neither is any comment containing the -- substring.
2013-09-11 22:40:09 +02:00
Paxton Hare
4a0f052242 docs(ngModel): provide link for best practices.
Closes #3973
2013-09-11 20:41:47 +01:00
Sam Dornan
f86395aadf docs(scope): clean up grammar and improve clarity
Some typos fixed and grammar improved:
- withing -> within
- life-cycle -> life cycle
- extraneous spaces
- grammar mistakes
- missing commas
- reworded unclear statements

Closes #3920
2013-09-11 13:56:56 +01:00
rodyhaddad
c0db11c607 style(ngForm): simplify restrict difference between form and ngForm 2013-09-11 13:28:17 +01:00
rodyhaddad
573d41b73c docs(ngChange): remove wrong @restrict and add missing @param 2013-09-11 13:28:17 +01:00
rodyhaddad
d8987c170f docs(ng.directives): add correct @restrict for all ng directives 2013-09-11 13:28:17 +01:00
Butch Peters
26685782b3 docs(Attributes): add missing documentation for $observe method
- Add proper ngdoc annotations to existing $observe documentation
- Add link to directive guide for usage example of $observe
- Add note about $observe function parameter signature

Closes #3957
2013-09-11 12:11:38 +01:00
naorye
d63a50c3c3 docs($q): clarify what happens when rejected
Closes #3943
2013-09-10 22:06:04 +01:00
jakub-bochenski
ce351e69b1 docs(angular.copy): clarify corner cases
The behaviour when null or undefined was passed was not clear.
The exception thrown when source == destination was not documented.

Closes #3946
2013-09-10 22:03:08 +01:00
Pete Bacon Darwin
01a7ec0866 docs(mock.inject): fix typo 2013-09-09 08:44:12 +01:00
Pete Bacon Darwin
4def730de7 fix(browserTrigger): do not use document.createEvent method
Firefox 23 has deprecated the use of createEvent for transition and
animation events.  We must now use `new TransitionEvent()` and
`new AnimationEvent()` if they are available.

But of course IE doesn't support this format correctly so we must wrap
the attempt in a try block and revert to document.createEvent if necessary..
2013-09-07 07:30:57 +01:00
Matias Niemelä
d50ed6bfb8 fix(ngAnimate): check elapsedTime on current event
onAnimationProgress now checks the event's elapsedTime property before
checking the originalEvent.elapsedTime property.
Use browserTrigger with elapsedTime parameter to trigger animation events
2013-09-06 22:19:53 +01:00
Matias Niemelä
28f56a383e fix(ngScenario): provide event parameters as object
BREAKING CHANGE: browserTrigger now uses an eventData object instead of direct parameters for mouse events.
To migrate, place the `keys`,`x` and `y` parameters inside of an object and place that as the third parameter
for the browserTrigger function.
2013-09-06 17:00:37 -04:00
Matias Niemelä
32ad292611 refactor($animate): use CSS3 transition/animation events instead of $timeouts to track ongoing animations
Closes #3629
Closes #3874
2013-09-05 17:20:28 -04:00
JasonM23
e12e584ca8 docs(mock.inject): document underscore wrapping syntax
Add a summary describing the ignored underscore syntax sugar helper,
with a simple use case example.

Closes #3621
2013-09-05 14:34:40 +01:00
James Daily
ae70ec7946 docs(booleanAttrs): improve parameter docs for boolean attributes
Closes #3724
2013-09-05 13:16:40 +01:00
Pete Bacon Darwin
327a78604a docs(angular.bootstrap): clarify modules parameter
It was not clear what you could pass to specify modules to load in the
`module` parameter of this function. The `modules` parameter takes an
array.

The main case is to provide a String, which is the name of a "predefined"
angular module.
The side cases are to provide a Function (or an annotated function in the
form of an Array), which will be invoked by the injector as a run block.

It is not possible to "define" new modules via this parameter.

Closes #3692
2013-09-05 12:18:56 +01:00
Pete Bacon Darwin
21b1d22563 docs(): parameter for html5Mode is boolean 2013-09-05 10:01:50 +01:00
Ben Lesh
7ed5599a4b docs($anchorScroll): provide an example of basic usage.
Per a request made by Peter Bacon Darwin here:  http://www.benlesh.com/2013/02/angular-js-scrolling-to-element-by-id.html?showComment=1370941217879#c8718313084813008967
2013-09-05 08:32:52 +01:00
Matias Niemelä
40c0220c47 fix(ngView): ensure ngClass works with together with ngView's transclusion behavior
Closes: #3727
2013-09-03 17:06:49 -07:00
Matias Niemelä
36ad40b18c fix(ngAnimate): ensure that ngClass is always compiled before enter, leave and move animations
Closes #3727
Closes #3603
2013-09-03 17:06:49 -07:00
Matias Niemelä
4e15c4fb47 chore($rootScope): provide support to execute a function after the digest cycle is complete 2013-09-03 17:06:49 -07:00
Matias Niemelä
4382df03fa fix(ngAnimate): cut down on extra $timeout calls 2013-09-03 17:06:49 -07:00
Merrick Christensen
f737c97df0 feat(ngMock): allow passing an object literal as shorthand to module 2013-09-03 14:22:12 -07:00
jankuca
8e48c4ff6a fix($http): allow empty responses to be cached
Closes #3809
2013-09-02 11:47:51 +02:00
Chirayu Krishnappa
427ee93f11 fix(core): parse IE11 UA string correctly
It's great that IE11 wants to be compatible enough that it doesn't want
to be special cased and treated differently.

However, as long as one has to have a different code path for IE than
for the other supported browsers, we still need to detect and special
case it.  For instance, our URL parsing code still needs the same
workaround the we used for IE10.  We still see the same Access denied /
TypeError exceptions when setting certain values.  FYI, Angular doesn't
generally blindly test for IE – we also check the version number.

Thanks to modern.ie for the free IE11 test VM.

Closes #3682
2013-08-29 16:07:49 -07:00
Chirayu Krishnappa
068d8615d2 perf(ngBindHtml): watch the original value and sanitize later 2013-08-29 12:47:51 -07:00
Adam de Baugh
baaa73ee1e fix(ngMocks): $logProvider should not use internal APIs
angular.mocks.$LogProvider $logProvider.debugEnabled(false) is crashing
with undefined when run inside karma/jasmine test runner:

angular.module('foo', []).config(['$logProvider', function ($logProvider) {
  $logProvider.debugEnabled(false);
}]);

Closes #3612
2013-08-29 12:06:30 -07:00
Colin Frei
c65fcc003d docs($q): document notify behavior
Closes #3341
2013-08-29 11:50:52 -07:00
Igor Minar
4114f9c21b revert: feat(mocks): make $timeout#flush throw an exception when empty
This reverts commit cbf06a5d64.

This turned out to be a bad idea because it allow us to fast-forward
the wall clock time (see previous commit).
2013-08-27 17:23:36 -07:00
Igor Minar
70b44ad32a revert: fix(mocks): $timeout#flush should not update time when empty
This reverts commit 42af8eada2.

This turned out to be a bad idea as it prevents us from moving the
time forward and asserting that the component state didn't change
due to the scheduled task executing too early.
2013-08-27 17:21:11 -07:00
Igor Minar
0f56cfdd13 style($http): remove unused argument 2013-08-27 15:57:01 -07:00
Igor Minar
6382e21fb2 fix(i18n): remove obsolete locale files
Remove obsolete locale files that are not found in Google Closure library.

I don't know why they were removed, but without a link to Closure we can't
maintain these files going forward so I'm deleting them.

BREAKING CHANGE: some non-common region-specific local files were removed.
2013-08-27 15:55:37 -07:00
Igor Minar
6b91aa0a18 feat(Scope): async auto-flush $evalAsync queue when outside of $digest
This change causes a new $digest to be scheduled in the next tick if
a task was was sent to the $evalAsync queue from outside of a $digest
or an $apply.

While this mode of operation is not common for most of the user code,
this change means that $q promises that utilze $evalAsync queue to
guarantee asynchronicity of promise apis will now also resolve outside
of a $digest, which turned out to be a big pain point for some developers.

The implementation ensures that we don't do more work than needed and
that we coalese as much work as possible into a single $digest.

The use of $browser instead of setTimeout ensures that we can mock out
and control the scheduling of "auto-flush", which should in theory
allow all of the existing code and tests to work without negative
side-effects.

Closes #3539
Closes #2438
2013-08-26 09:06:25 -07:00
Igor Minar
42af8eada2 fix(mocks): $timeout#flush should not update time when empty
When $timeout#flush is called with a delay and no task can be flushed within that
delay, the current time should not be updated as that gets the mock into an inconsistent
state.

BREAKING CHANGE: if a tests was written around the buggy behavior the delays might be off now

This would typically not be a problem, but because of the previous breaking change in
$timeout.flush, the combination of two might be confusing and that's why we are documenting
it.

Old behavior:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); //flushes only doSomething() task
```

New behavior:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); // throws "no task to be flushed" exception again
                  // because previous exception didn't move the time forward
```

Fixed test:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(500); // flushes only doSomething() task
```
2013-08-25 14:46:55 -07:00
Igor Minar
cbf06a5d64 feat(mocks): make $timeout#flush throw an exception when empty
When calling $timeout.flush with or without a delay an exception should
be thrown if there is nothing to be flushed.

This prevents tests from flushing stuff unnecessarily.

BREAKING CHANGE: calling $timeout.flush(delay) when there is no task to be flushed
within the delay throws an exception now.

Please adjust the delay or remove the flush call from your tests as the exception
is a signed of a programming error.
2013-08-25 14:46:54 -07:00