aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/scopeSpec.js
AgeCommit message (Collapse)Author
2012-03-08docs($rootScope): rename ttl to digestTtl + docsIgor Minar
2012-02-23feta(scope): watch object refference or equalityMisko Hevery
Breaks: Must set $watch equality to true for the old behavior
2012-02-21feat($compile) add locals, isolate scope, transclusionMisko Hevery
2012-02-21feat(scope): scope.$emit/$broadcast return the event object, add cancelled ↵Vojta Jina
property
2012-01-25fix($parse): get rid of $unboundFnIgor Minar
Closes #731
2012-01-23fix(scope): support watching functionsIgor Minar
currently we run into infinite digest if a function is being watched as an expression. This is because we generate bound function wrapper when the watch is processed via parser. I'm not too keen on the solution because it relies on the unbound fn that is being exposed for other reasons, but I can't think of a better way to deal with this right now
2012-01-23refactor(scope.$watch): rearrange arguments passed into watcher (newValue, ↵Vojta Jina
oldValue, scope) As scopes are injected into controllers now, you have the reference anyway, so having scope as first argument makes no sense… Breaks $watcher gets arguments in different order (newValue, oldValue, scope)
2012-01-23refactor(scope): separate controller from scopeVojta Jina
Controller is standalone object, created using "new" operator, not messed up with scope anymore. Instead, related scope is injected as $scope. See design proposal: https://docs.google.com/document/pub?id=1SsgVj17ec6tnZEX3ugsvg0rVVR11wTso5Md-RdEmC0k Closes #321 Closes #425 Breaks controller methods are not exported to scope automatically Breaks Scope#$new() does not take controller as argument anymore
2012-01-12refactor(module): strict separation between module-config / app-runtimeMisko Hevery
2012-01-06feat(scope): throw exception when recursive $applyIgor Minar
2011-12-07style(scopeSpec): clean up scopeSpec.jsIgor Minar
2011-11-30scope($digest): add new&old val to the infinite $digest logIgor Minar
2011-11-21fix(scope): $watch (and angular.equals) should support NaN valuesCodier
- since NaN !== NaN in javascript digest can get into an infinite loop when model value is set to NaN - angular.equals(NaN, NaN) should return true since that's what we expect when comparing primitives or objects containing NaN values Previously NaN because of its special === properties was used as the initial value for watches, but that results in issues when NaN is used as model value. In order to allow for model to be anything incuding undefined and NaN we need to mark the initial value differently in a way that would avoid these issues, allow us to run digest without major perf penalties and allow for clients to determine if the listener is being called because the watcher is being initialized or because the model changed. This implementation covers all of these scenarios. BREAKING CHANGE: previously to detect if the listener was called because the watcher was being initialized, it was suggested that clients check if old value is NaN. With this change, the check should be if the newVal equals the oldVal. Closes #657
2011-11-14refactor(injector): $injector is no longer a function.Misko Hevery
- $injector('abc') -> $injector.get('abc'); - $injector(fn) -> $injector.invoke(null, fn);
2011-11-14style(docs): make jslint happy - fix some warningsVojta Jina
2011-11-14refactor(services): migrate angular.service -> moduleMisko Hevery
2011-11-14refactor(injector): switch to injector 2.0 introduce modulesMisko Hevery
2011-11-14refactor(injector): turn scope into a serviceMisko Hevery
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
2011-11-14move(scope): appease the History GodMisko Hevery
- renamed: src/Scope.js -> src/service/scope.js - renamed: test/ScopeSpec.js -> test/service/scopeSpec.js