aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
AgeCommit message (Collapse)Author
2013-08-12fix(equals): {} and [] should not be considered equivalentBrenton
angular.equals was returning inconsistent values for the comparison between {} and []: angular.equals({}, []) // true angular.equals([], {}]) // false Since these object are not of the same type, they should not be considered equivalent.
2013-08-09fix(angular.copy): change angular.copy to correcly clone RegExpAndy Hitchman
angular.copy previously copied RegExp as an empty object. Change detects RegExp instance and clones into new RegExp. This change is based on a previous fix to allow Date to be copied. Closes #3473 Closes #3474
2013-07-16test(utils): Adds a missing test for snake_caseJames deBoer
2013-07-13fix(angular.equals): add support for regular expressionsBen Ripkens
Regular expression objects didn't used to be considered to be equal when using 'angular.equals'. Dirty checking therefore failed to recognize a property modification. Closes #2685 Conflicts: test/AngularSpec.js
2013-07-12feat(Angular.js): skip JSON.stringify for undefinedGreg Thornton
Return early in `angular.toJson` if the object to be stringified is `undefined`. IE8 stringifies `undefined` to `'undefined'` whereas other browsers return `undefined`. This normalizes behavior and passes currently broken unit tests in IE8.
2013-06-20fix(Angular.js): don't crash on invalid query parametersPete Bacon Darwin
2013-05-08fix(angular): do not copy $$hashKey in copy/extend functions.R. Merkert
Copying the $$hashKey as part of copy/extend operations makes little sense since hashkey is used primarily as an object id, especially in the context of the ngRepeat directive. This change maintains the existing $$hashKey of an object that is being copied into (likewise for extend). It is not uncommon to take an item in a collection, copy it, and then append it to the collection. By copying the $$hashKey, this leads to duplicate object errors with the current ngRepeat. Closes #1875
2013-03-06feat(angular.bootstrap): support deferred bootstrapJulie
This features enables tools like Batarang and test runners to hook into angular's bootstrap process and sneak in more modules into the DI registry which can replace or augment DI services for the purpose of instrumentation or mocking out heavy dependencies. If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap is called. angular.resumeBootstrap takes an optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with. Conflicts: src/Angular.js
2013-02-26fix($http): don't encode URL query substring "null" to "+"Andrew McLeod
Fixes issue in encodeUriQuery used by $http and $resource that treats null as a string and replaces the characters "null" with "+".
2013-02-14fix(compiler): Allow startingTag method to handle text / comment nodesShyam Seshadri
2013-02-11test(angular.copy): add tests for scenarios when target is missingIgor Minar
2013-02-11fix(angular.forEach): correctly iterate over objects with length propIgor Minar
Should handle JQLite, jQuery, NodeList and other objects like arrays but not other generic objects or instances of user defined types with length property. Closes #1840
2013-01-22fix(angular.equals): relax the comparison for undefined propertiesIgor Minar
in 5ae63fd3 the comparison was made consistent but strict, so that angular.equals({}, {foo: undefined}) // always returns false this turns out to cause issues for data that is being roundtripped via network and serialized via JSON because JSON.stringify serializes {foo: undefined} as {}. Since angular.equals() behaved like this before the 5ae63fd3 in 50% of the cases, changing the behavior in this way should not introduce any significant issues. Closes #1648
2013-01-17fix(angular.equals): consistently compare undefined object propsIgor Minar
previously: a = {}; b = {x:undefined}; angular.equals(a, b) == angular.equals(b, a) // returns false. both should return false because these objects are not equal. unlike in implemented in #1695 the comparison should be stricter and return false not true. if we need to relax this in the future we can always do so. Closes #1648
2012-08-30test(bootstrap): test exception siling during bootstrapIgor Minar
Closes #1018
2012-08-30test(ngApp): add missing test for [ng-app] bootstrapIgor Minar
2012-06-08fix(startingTag): make tag name always lowercaseIgor Minar
some browsers (IE) always provide the nodeName as upper-case
2012-04-09chore(tests): rename all directive names to the normalized formIgor Minar
2012-03-29refactor($compile): move methods of attr object into prototypeVojta Jina
We have many instances of this object and we clone them as well (e.g. ng-repeat). This should save some memory and performance as well. Double prefixed private properties of attr object: attr.$element -> attr.$$element attr.$observers -> attr.$$observers Update shallowCopy to not copy $$ properties and allow passing optional destination object.
2012-03-28refactor(fromJson/toJson): move the contents of these files into Angular.jsIgor Minar
these files are now mostly empty so it doesn't make sense to keep them separated from other helper functions
2012-03-22fix(forEach): should ignore prototypically inherited propertiesIgor Minar
Closes #813
2012-03-09fix(startTag): fix tagname extractionIgor Minar
the original code magically worked for ng:foo but for nothing else
2012-03-09chore(*): refactor all ng: to ng-Igor Minar
2012-02-23bug(equals): incorect comparison of datesMisko Hevery
2012-01-25refactor(directives): connect new compilerMisko Hevery
- turn everything into a directive
2012-01-25add($compile): add compiler v2.0 - not connectedMisko Hevery
2012-01-12refactor(module): strict separation between module-config / app-runtimeMisko Hevery
2012-01-10feat(module): new module loaderMisko Hevery
2012-01-06fix(angular.copy): throw Error if source and destination are identicalDhruv Manek
Closes #693
2011-11-30fix(copy,equals): prevent browser crashes with Scope or WindowIgor Minar
Scope and Window instances are special and when copied can crash browser. For this reason it makes sense to compare them only by identity.
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-14del($eager): removed the support for $eager servicesMisko Hevery
2011-11-14feat(bootstrap): added angular.bootstrap methodMisko Hevery
2011-11-14refactor(services): migrate angular.service -> moduleMisko Hevery
2011-11-14refactor(injector): switch to injector 2.0 introduce modulesMisko Hevery
2011-11-14new(injector): new injector v2.0Misko Hevery
- not connected to keep the CL small
2011-11-14refactor(compiler) turn compiler into a serviceMisko Hevery
BREAK - remove angular.compile() since the compile method is now a service and needs to be injected
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-08fix(directives): make directive names case-insensitiveIgor Minar
+ tests + added docs for angular.directive
2011-10-26feat(bootstrap): drop angular.js file name restrictions for autobindIgor Minar
The last script element in the dom is always us if the script that contains angular is loaded synchronously. For async loading manual bootstrap needs to be performed. Close #621
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11fix(filter): make json filter ignore private propertiesMisko Hevery
2011-09-16fix(specs): various fixes to get IE8+jquery unit tests greenIgor Minar
2011-08-30style(tests): correct indentationMisko Hevery
2011-08-12refactor(scope): remove $flush/$observe ng:eval/ng:eval-orderMisko Hevery
2011-08-02feat(scope): new and improved scope implementationMisko Hevery
- Speed improvements (about 4x on flush phase) - Memory improvements (uses no function closures) - Break $eval into $apply, $dispatch, $flush - Introduced $watch and $observe Breaks angular.equals() use === instead of == Breaks angular.scope() does not take parent as first argument Breaks scope.$watch() takes scope as first argument Breaks scope.$set(), scope.$get are removed Breaks scope.$config is removed Breaks $route.onChange callback has not "this" bounded
2011-07-27style(): fix couple of missing semi-colonsVojta Jina
2011-07-22feat(angular.version): add angular.versionDi Peng
- placeholders are replaced with actual angular versions when doing rake compile