Commit graph

24 commits

Author SHA1 Message Date
Pete Bacon Darwin
47f7bd706e fix(rootScope): make stopPropagation only stop its own event
All sibling event handlers residing on the same scope to were stopped
if one of them called stopPropagation.

Closes #4204
2013-10-05 22:45:43 +01:00
Lucas Galfasó
10cc1a42c9 fix($scope): $evalAsync executes on the right scope
Executes $evalAsync at the scope that the call was made

Closes: #3548
2013-10-02 11:10:29 -07:00
Pete Bacon Darwin
ac72bee400 style(rootScopeSpec): add semi-colons 2013-10-02 14:15:09 +01: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
Igor Minar
e86de0db56 test(Scope): fix tests after reverting commits
Making assertions on state (rather than interactions) is better anyway.
2013-08-27 22:36:23 -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
Ken Sheedlo
37123cd285 feat(minerr): log minerr doc url in development
Closes #3566
2013-08-15 13:23:18 -07:00
Igor Minar
3967f5f7d6 fix(Scope): ensure that isolate scopes use the main evalAsync queue
Previously any $evalAsync task scheduled from a isolate scope or a child of an isolate scope
would never execute because we never flushed this queue
2013-07-22 11:27:53 -07:00
Paulo Scardine
8bd6619b7e fix(scope): watches can be safely unregistered inside watch handlers
Closes #2915
2013-07-11 22:04:00 +01:00
Ken Sheedlo
003861d2fd chore(minErr): replace ngError with minErr 2013-06-17 13:29:30 -07:00
Igor Minar
b8ea7f6aba feat(ngError): add error message compression and better error messages
- add toThrowNg matcher
2013-05-24 17:03:21 -07:00
Gonzalo Ruiz de Villa
6452707d40 fix($rootScope) ensure $watchCollection correctly handles arrayLike objects 2013-05-02 15:12:37 +01:00
Matias Niemelä
2845dd1590 feat(ngdocs): added functionality to import and extract contents of external files inside docs comment code 2013-04-02 15:52:32 -07:00
Matias Niemelä
5eb968553a feat(Scope): add $watchCollection method for observing collections
The new method allows to shallow watch collections (Arrays/Maps).
2013-03-29 22:00:25 -07:00
Daniel Luz
1d7a95df56 feat(scope): only evaluate constant $watch expressions once 2013-02-14 14:43:56 -08:00
Daniel Luz
ef268196b9 fix($rootScope): minor typo fixes 2013-02-14 14:43:56 -08:00
Igor Minar
d6da505f4e fix(Scope): ensure that a scope is destroyed only once
Due to bd524fc4 calling $destroy() on a scope mupltiple times cases NPE.

Closes #1627
2012-11-30 13:10:00 +01:00
Vojta Jina
e6966e05f5 fix(Scope): allow removing a listener during event 2012-11-25 11:39:54 +01:00
Misko Hevery
331cd5a8cb fix($evalAsync): have only one global async queue
Having one async queue per scope complicates the matters when users wish to do
partial scope updates, since many services put events on the rootScope. By
having single queue the programing model is simplified.
2012-09-11 16:12:41 -07:00
Misko Hevery
c269eb3d26 fix(docs) typo 2012-08-27 14:59:19 -07:00
Misko Hevery
989446ecee fix($rootScope): TTL exception does not clear $$phase
When $digest() throws infinite digest exception it
does not properly clear the $phase leaving the scope
in an inconsistent state.

Closes #979
2012-05-23 16:01:20 -07:00
Vojta Jina
84542d2431 feat(scope): add event.preventDefault() and event.defaultPrevented 2012-05-17 15:47:53 -07:00
Vojta Jina
91db99208e refactor(scope.$emit): rename event.cancel() to event.stopPropagation()
Breaks event.cancel() is event.stopPropagation()
2012-05-17 15:47:52 -07:00
Misko Hevery
2430f52bb9 chore(module): move files around in preparation for more modules 2012-03-28 11:16:35 -07:00
Renamed from test/service/scopeSpec.js (Browse further)