aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
AgeCommit message (Collapse)Author
2013-08-29fix(core): parse IE11 UA string correctlyChirayu Krishnappa
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-09fix(re-bootstrap): Throw an error when bootstrapping a bootstrapped element.Jeff Cross
Nothing would prevent a user from accidentally calling angular.bootstrap on an element that had already been bootstrapped. If this was done, odd behavior could manifest in an application, causing different scopes to update the same DOM, and causing debugger confusion. This fix adds a check inside of angular.bootstrap to check if the passed-in element already has an injector, and if so, will throw an error.
2013-08-08fix(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-31fix(isArrayLike) Correctly detect arrayLike itemsDaniel Herman
Change the implementation of isArrayLike to use one heavily based on the implementation in jQuery in order to correctly detect array-like objects, that way functionality like ngRepeat works as expected.
2013-07-27docs(*): fixed typos and ngdoc parameter namesCarl Danley
2013-07-26feat(ngAnimate): complete rewrite of animationsMatias Niemelä
- ngAnimate directive is gone and was replaced with class based animations/transitions - support for triggering animations on css class additions and removals - done callback was added to all animation apis - $animation and $animator where merged into a single $animate service with api: - $animate.enter(element, parent, after, done); - $animate.leave(element, done); - $animate.move(element, parent, after, done); - $animate.addClass(element, className, done); - $animate.removeClass(element, className, done); BREAKING CHANGE: too many things changed, we'll write up a separate doc with migration instructions
2013-07-24fix(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-07-23docs(bootstrap): Note that ngScenario requires ngAppBraden Shepherdson
ngScenario expects an ngApp directive to be used, and doesn't work for manually bootstrapped apps. The failure mode is to hang on navigation. Trying to make this wont-fix bug less obscure by documenting it. Eventually Protractor will replace ngScenario and fix this.
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
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-07-11refactor(Angular.js): remove code duplicationEric Subach
Closes #2890
2013-07-09docs(angular.identity): fix missing 'angular' in identity functionMarco Vito Moscaritolo
2013-07-08fix(angular.equals): do not match keys defined in the prototype chainDaniel Luz
Merely testing for object[key] will give incorrect results on keys defined in Object.prototype. Note: IE8 is generally broken in this regard since `for...in` never returns certain property keys even if they are defined directly on the object. See #2141 - partially merges this PR
2013-07-03refactor(core): use native String.prototype.trim if availableSebastian Müller
2013-07-01fix(Angular.js): handle duplicate params in parseKeyValue/toKeyValuejoshkurz
parseKeyValue and toKeyValue can now handle duplicate values in the query. ``` ?x=1&x=2 <-> {x:[1,2]} ``` The algorithm looks like: 1)parseKeyValue looks for presence of obj[key] 2)detects and replaces obj[key] with [obj[key],val] 3)then pushes more duplicates if necessary 4)toKeyValue decodes array correctly 5)(not changed)$location.search({param: 'key'}) still replaces if necessary 6)(not changed)$location.search({param: ['key1', 'key2']}) sets the url with duplicates BREAKING CHANGE: Before this change: - `parseKeyValue` only took the last key overwriting all the previous keys; - `toKeyValue` joined the keys together in a comma delimited string. This was deemed buggy behavior. If your server relied on this behavior then either the server should be fixed or a simple serialization of the array should be done on the client before passing it to $location.
2013-07-01docs(Angular.js): explain that toJson strips $... propertiesSpencer Applegate
In Angular.toJson, any properties with a leading '$' character will be stripped from the resulting string since angular uses this notation internally for services. There have been complaints of not knowing about this functionality until it breaks within their code.
2013-06-24fix($parse): move global getter out of parse.jsChirayu Krishnappa
2013-06-20refactor(angular.bootstrap): rename internal functionPete Bacon Darwin
2013-06-20fix(Angular.js): don't crash on invalid query parametersPete Bacon Darwin
2013-06-19feat(jqLite): switch bind/unbind to more recent jQuery on/offMichał Gołębiowski
jQuery switched to a completely new event binding implementation as of 1.7.0, centering around on/off methods instead of previous bind/unbind. This patch makes jqLite match this implementation while still supporting previous bind/unbind methods.
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-06-06chore(AngularPublic): remove angular.noConflict featureMatias Niemelä
2013-06-04docs(Angular.js): clarify ngApp usageRobbie Ferrero
2013-05-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-05-23fix(jqLite): correctly monkey-patch core jQuery methodsMichał Gołębiowski
When real jQuery is present, Angular monkey patch it to fire `$destroy` event. This commit fixes two issues in the jQuery patch: - passing a selector to the $.fn.remove method (only fire `$destroy` on the matched elements) - using `$.fn.html` without parameters as a getter (do not fire `$destroy`)
2013-05-21docs(Angular.js): add missing @returns to extend()Joakim Blomskøld
2013-05-09docs(Angular.js) move forEach docs to correct placeAlex Pods
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-04-22fix($animator): remove dependency on window.setTimeout.Misko Hevery
2013-04-15docs(Angular.js): fix typoLaurent
2013-04-11docs: fix typosMatt Haggard
2013-04-11docs(ngApp): fixed typoBrent Morrow
Use this directive to auto-bootstrap **an** application.
2013-04-02feat(ngAnimate): add support for animationMisko Hevery
2013-03-29docs(*): fixed typosPascal Borreli
2013-03-19chore(Angular): remove superfluous fromCharCode functionJavier Mendiara Cañardo
Remove fromCharCode function as it was used only in two inner functions in the code, and its functionality is achieved in several other places by using String.fromCharCode Breaks fromCharCode closure function, String.fromCharCode should be used instead
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.
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-14feat(noConflict): restore previous angular namespace referenceJames Morrin
2013-02-14fix(compiler): Allow startingTag method to handle text / comment nodesShyam Seshadri
2013-02-11revert: refactor(angular.copy): use slice(0) to clone arraysIgor Minar
This reverts commit 28273b7f1ef52e46d5bc23c41bc7a1492cf23014o. slice(0) doesn't perform deep copy of the array so its unsuitable for our purposes.
2013-02-11refactor(angular.copy): use array.length=0 to empty arraysIgor Minar
2013-02-11refactor(angular.copy): use slice(0) to clone arraysIgor Minar
slice(0) is way faster on most browsers
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-02-05docs(ngApp): fix typoradu
2013-01-29docs(nextUid): fix typoradu
Update src/Angular.js removed redundant 'the' from nextUid()'s ngdoc
2013-01-29refactor(Angular.js): prevent Error variable name leak in testsmetaweta
Remove var Error = window.Error window.Error is a read-only property in Apps Script. Igor says, "we should just delete that line instead. I think it was misko's attempt to get better closure minification, but it turns out that it's actually hurting us after gzip (I verified it)."
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-11-21docs(): Fix a couple of typos in the documentationKris Jenkins
2012-11-11docs(encodeUriSegment): fix typoJosh Adams