aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/rootScope.js
AgeCommit message (Collapse)Author
2014-03-19fix($rootScope): ng-repeat can't handle NaN values. #4605Sekib Omazic
$watchCollection checks if oldValue !== newValue which does not work for NaN. This was causing infinite digest errors, since comparing NaN to NaN in $watchCollection would always return false, indicating that a change was occuring on each loop. This fix adds a simple check to see if the current value and previous value are both NaN, and if so, does not count it as a change. Closes #4605
2014-03-18fix(Scope): $watchCollection should call listener with oldValueIgor Minar
Originally we destroyed the oldValue by incrementaly copying over portions of the newValue into the oldValue during dirty-checking, this resulted in oldValue to be equal to newValue by the time we called the watchCollection listener. The fix creates a copy of the newValue each time a change is detected and then uses that copy *the next time* a change is detected. To make `$watchCollection` behave the same way as `$watch`, during the first iteration the listener is called with newValue and oldValue being identical. Since many of the corner-cases are already covered by existing tests, I refactored the test logging to include oldValue and made the tests more readable. Closes #2621 Closes #5661 Closes #5688 Closes #6736
2014-03-07style(jsdoc tags): remove/ammend invalid tagsPeter Bacon Darwin
As highlighted by the new sterner dgeni.
2014-03-02docs(*): ensure jsdoc type expressions are validPeter Bacon Darwin
2014-02-26docs(*): fix jsdoc type expressionsPeter Bacon Darwin
These errors in the docs were preventing some parts of the docs from being parsed.
2014-02-21docs(*): fix anchors for members in api docsPeter Bacon Darwin
2014-02-16docs(all): convert <pre>/</pre> snippets to GFM snippetsCaitlin Potter
2014-02-16docs(bike-shed-migration): convert doctype and namesPeter Bacon Darwin
2014-01-30fix(docs): clarify doc for "args" in $broadcast and $emitBrad Williams
Closes #6047.
2014-01-13fix($rootScope): prevent infinite $digest by checking if asyncQueue is empty ↵Noam Lewis
when decrementing ttl An infinite $digest loop can be caused by expressions that invoke a promise. The problem is that $digest does not decrement ttl unless it finds dirty changes; it should check also if asyncQueue is empty. Generally the condition for decrementing ttl should be the same as the condition for terminating the $digest loop. Fixes #2622
2014-01-04docs(rootScope): fix typoKenneth Lynne
Closes #5633
2014-01-03core(Scope): rename 'debugger' to 'web inspector' to avoid woes with g3 ↵Igor Minar
presubmits
2014-01-02fix(Scope): don't let watch deregistration mess up the dirty-checking digest ↵Igor Minar
loop Closes #5525
2013-12-27perf(Scope): limit propagation of $broadcast to scopes that have listeners ↵Karl Seamon
for the event Update $on and $destroy to maintain a count of event keys registered for each scope and its children. $broadcast will not descend past a node that has a count of 0/undefined for the $broadcasted event key. Closes #5341 Closes #5371
2013-12-12docs(ng.$rootScope.Scope): fix API linksVlad GURDIGA
Also added a note to the Writing AngularJS Documentation: https://github.com/angular/angular.js/wiki/Writing-AngularJS-Documentation/d0c715ef89 Closes #5261
2013-12-05chore(Scope): short-circuit after dirty-checking last dirty watcherKarl Seamon
Stop dirty-checking during $digest after the last dirty watcher has been re-checked. This prevents unneeded re-checking of the remaining watchers (They were already checked in the previous iteration), bringing a substantial performance improvement to the average case run time of $digest. Closes #5272 Closes #5287
2013-12-04fix($rootScope): broadcast $destroy event on $rootScopeJeff Cross
Fixes #5169
2013-12-04fix($rootScope): clear phase if an exception is raised by a watcherThomas Guillory
Add calls to clearPhase() when an exception is raised by a watcher while a digest cycle, in order to not be stuck on `$digest` scope phase
2013-12-03style(Scope): remove extra wsIgor Minar
2013-12-03style(Scope): rename child scope type from Child to ChildScopeIgor Minar
This change makes it easier to debug angular, especiall when dealing with heap snapshots and hunting for memory leaks.
2013-10-25docs($rootScope): added $eval `locals` parameter documentationCaio Cunha
Added documentation for `locals` parameter of `$eval` method.
2013-10-24docs(rootScope): add example of using a listener function for $watchWesley Cho
Closes #4451
2013-10-22style: make jshint happyVojta Jina
2013-10-18docs: correct broken linksVojta Jina
This also contains some whitespace corrections by my editor.
2013-10-15docs($rootScope): better document infinite digest and ttlIgor Minar
2013-10-05fix(rootScope): make stopPropagation only stop its own eventPete Bacon Darwin
All sibling event handlers residing on the same scope to were stopped if one of them called stopPropagation. Closes #4204
2013-10-03docs(rootScope): improve grammar and clarityDave Peticolas
Closes #4234
2013-10-02fix($scope): $evalAsync executes on the right scopeLucas Galfasó
Executes $evalAsync at the scope that the call was made Closes: #3548
2013-09-27style($rootScope): fix argument name in $postDigest apiIgor Minar
2013-09-11docs(scope): clean up grammar and improve claritySam Dornan
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-03chore($rootScope): provide support to execute a function after the digest ↵Matias Niemelä
cycle is complete
2013-08-26feat(Scope): async auto-flush $evalAsync queue when outside of $digestIgor Minar
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-07chore(dump): fix our karma.dump bridgeIgor Minar
previously it didn't work for dumping multiple objects
2013-07-22fix(Scope): ensure that isolate scopes use the main evalAsync queueIgor Minar
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-18docs(jqLite): document "$destroy" eventPete Bacon Darwin
2013-07-11fix(scope): watches can be safely unregistered inside watch handlersPaulo Scardine
Closes #2915
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-05-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-05-10docs($scope): clarify documentation for $broadcastwilltj
2013-05-02fix($rootScope) ensure $watchCollection correctly handles arrayLike objectsGonzalo Ruiz de Villa
2013-04-15docs(rootScope): fix typoPete Bacon Darwin
2013-04-15docs(rootScope): Fix various typosLaurent
2013-04-02feat(ngdocs): added functionality to import and extract contents of external ↵Matias Niemelä
files inside docs comment code
2013-03-29feat(Scope): add $watchCollection method for observing collectionsMatias Niemelä
The new method allows to shallow watch collections (Arrays/Maps).
2013-03-29docs(*): fixed typosPascal Borreli
2013-02-14docs($rootScope): rearrange event listener docsEwen Cumming
2013-02-14feat(scope): only evaluate constant $watch expressions onceDaniel Luz
2013-02-14fix($rootScope): minor typo fixesDaniel Luz
2013-01-30feat(Scope): expose transcluded and isolate scope info for batarangBrian Ford
test($compile): add test for exposing transclude and isolate scope info to batarang
2013-01-29docs(Scope): fix argument docs for $onFred Sauer