aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2013-05-23feat($resource): expose promise instead of only $thenAlexander Shtuchkin
- Instance or collection have `$promise` property which is the initial promise. - Add per-action `interceptor`, which has access to entire $http response object. BREAKING CHANGE: resource instance does not have `$then` function anymore. Before: Resource.query().$then(callback); After: Resource.query().$promise.then(callback); BREAKING CHANGE: instance methods return the promise rather than the instance itself. Before: resource.$save().chaining = true; After: resource.$save(); resourve.chaining = true; BREAKING CHANGE: On success, promise is resolved with the resource instance rather than http response object. Use interceptor to access the http response object. Before: Resource.query().$then(function(response) {...}); After: var Resource = $resource('/url', {}, { get: { method: 'get', interceptor: { response: function(response) { // expose response return response; } } } });
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-20chore(ngdocs): move angular-bootstrap.js to be generated only inside the ↵Matias Niemelä
docs and remove from the build process
2013-05-20feat($http): add support for aborting via timeout promisesDavid Bennett
If the timeout argument is a promise, abort the request when it is resolved. Implemented by adding support to $httpBackend service and $httpBackend mock service. This api can also be used to explicitly abort requests while keeping the communication between the deffered and promise unidirectional. Closes #1159
2013-05-17test($parse): improve clarity of ternary testsZach Snow
2013-05-16feat($animator): provide support for custom animation eventsMatias Niemelä
2013-05-16test($animator): ensure invalid $sniffer.transitions and $sniffer.animations ↵Matias Niemelä
flags are caught in animation spec code
2013-05-16fix(jqLite): pass a dummy event into triggerHandlerJulie
Previously, anchor elements could not be used with triggerHandler because triggerHandler passes null as the event, and any anchor element with an empty href automatically calls event.preventDefault(). Instead, pass a dummy event when using triggerHandler, similar to what full jQuery does. Modified from PR #2379.
2013-05-16feat($parse): add support for ternary operators to parserZach Snow
Add '?' token to lexer, add ternary rule to parser at (hopefully) proper precedence and associativity (based on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Operator_Precedence). Since (exp1 && exp2 || exp3) is supported by the parser, and (exp1 ? exp2 : exp3) works the same way, it seems reasonable to add this minor form of control to templates (see #719).
2013-05-16fix($resource): null default param results in TypeErrorRyan Schumacher
Fixes issue when setting a default param as `null` error `TypeError: Cannot read property 'charAt' of null`
2013-05-16feat($http): add a default content type for PATH requestsDaniel Stockton
The default header is now application/json which while not perfect in all cases is better than the browser default application/xml. The new headers also makes for better compatibility with Rails 4
2013-05-14feat(ngSrcset): add new ngSrcset directiveSamuel Santos
In line with ngSrc and ngHref, this new directive ensures that the `srcset` HTML5 attribute does not include a pre-interpolated string. Without it the browser will fetch from the URL with the literal text `{{hash}}` until AngularJS replaces the expression inside `{{hash}}`. Closes #2601
2013-05-14feat(scenario): adds mousedown and mouseup event triggers to scenarioAndreas Marek
Added mousedown and mouseup event triggers to scenadio dsl 'element' expression. Added mousedown and mouseup to the custom jquery trigger method to generate real events.
2013-05-14feat($resource): collapse empty suffix parameters correctlyGlenn Goodrich
Previously only repeated `/` delimiters were collapsed into a single `/`. Now, the sequence `/.` at the end of the template, i.e. only followed by a sequence of word characters, is collapsed into a single `.`. This makes it easier to support suffixes on resource URLs. For example, given a resource template of `/some/path/:id.:format`, if the `:id` is `""` but format `"json"` then the URL is now `/some/path.json`, rather than `/some/path/.json`. BREAKING CHANGE: A `/` followed by a `.`, in the last segment of the URL template is now collapsed into a single `.` delimiter. For example: `users/.json` will become `users.json`. If your server relied upon this sequence then it will no longer work. In this case you can now escape the `/.` sequence with `/\.`
2013-05-14feat(select): match options by expression other than object identityquazzie
Extend ng-options with a new clause, "track by [trackByExpression]", which can be used when working with objects. The `trackByExpression` should uniquely identify select options objects. This solves the problem of previously having to match ng-options objects by identity. You can now write: `ng-options="obj as obj.name for obj in objects track by obj.id"` The "track by" expression will be used when checking for equality of objects. Examples: <select ng-model="user.favMovieStub" ng-options="movie as movie.name for movie in movies track by movie.id"> </select> scope: { user: { name: 'Test user', favMovieStub: { id: 1, name: 'Starwars' } } movies: [{ id: 1, name: 'Starwars', rating: 5, ... }, { id: 13, ... }] } The select input will match user favMovieStub to the first movie in the movies array, and show "Star Wars" as the selected item.
2013-05-13feat(ngAnimate): cancel previous incomplete animations when new animations ↵Matias Niemelä
take place
2013-05-13chore($sniffer): replace remaining supportsTransitions/supportsAnimations ↵Matias Niemelä
flags inside tests
2013-05-11fix($browser): should use first value for a cookie.Chirayu Krishnappa
With this change, $browser.cookies()["foo"] will behave like docCookies.getItem("foo") where docCookies is defined at https://developer.mozilla.org/en-US/docs/DOM/document.cookie This fixes the issue where, if there's a value for the XSRF-TOKEN cookie value with the path /, then that value is used for all applications in the domain even if they set path specific values for XSRF-TOKEN. Closes #2635
2013-05-10fix(ngPluralize): handle the empty string as a valid overrideLucas Galfasó
Fix the check for overrides so it is able to handle the empty string Closes #2575
2013-05-08chore(ngAnimate): CSS classes X-setup/X-start -> X/X-activeMatias Niemelä
BREAKING CHANGE: css classes foo-setup/foo-start become foo/foo-active The CSS transition classes have changed suffixes. To migrate rename .foo-setup {...} to .foo {...} .foo-start {...} to .foo-active {...} or for type: enter, leave, move, show, hide .foo-type-setup {...} to .foo-type {...} .foo-type-start {...} to .foo-type-active {...}
2013-05-08feat(ngAnimate): Add support for CSS3 Animations with working delays and ↵Matias Niemelä
multiple durations
2013-05-08feat($sniffer): Add support for supportsAnimations flag for detecting CSS ↵Matias Niemelä
Animations browser support
2013-05-08test(sortedHtml): ignore bogus rowspan=1 and colspan=1 in IEIgor Minar
2013-05-08test(sortedHtml): fix comment support in sortedHtml helperIgor Minar
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-05-08feat($cookieStore): $cookieStore.get now parses blank string as blank stringIllniyar
closes #1918
2013-05-07fix(date): correctly format dates with more than 3 sub-second digitsKevin Wells
This date {{2003-09-10T13:02:03.123456Z | date: yyyy-mm-dd ss} is now treated as having 123.45ms. Previously it had 123456ms so 123 seconds were added to the formatted date. Use local date in unit tests so they work in any time zone
2013-05-07fix(select): ensure empty option is not lost in IE9Chad Smith
Fix a check inside render for select elements with ngOptions, which compares the selected property of an element with it's desired state. Ensure the placeholder, if available, is explicitly selected if the model value can not be found in the option list. Without these fixes it's up to the browser implementation to decide which option to choose. In most browsers, this has the effect of displaying the first item in the list. In IE9 however, this causes the select to display nothing. Closes #2150, #1826
2013-05-06fix($location): prevent navigation when event isDefaultPreventedMisko Hevery
2013-05-03feat(ngInclude): $includeContentRequested eventMatthieu Larcher
Adding a $includeContentRequested event in order to better keep track of how many includes are sent and be able to compare it with how many have finished.
2013-05-02fix($location): compare against actual instead of current URLMisko Hevery
2013-05-02fix($location): prevent navigation if already on the URLMisko Hevery
2013-05-02fix(ngAnamite): eval ng-animate expression on each animationMisko Hevery
2013-05-02feat(injector): add has method for queryingMisko Hevery
Closes #2556
2013-05-02fix(ngView): accidentally compiling leaving contentMisko Hevery
closes: #2304
2013-05-02fix(ngRepeat): correctly iterate over array-like objectsGonzalo Ruiz de Villa
Check if the object is array-like to iterate over it like it's done with arrays. Closes #2546
2013-05-02fix($rootScope) ensure $watchCollection correctly handles arrayLike objectsGonzalo Ruiz de Villa
2013-05-01fix($location): back-button should fire $locationChangeStartquazzie
Before $locationChangeStart event is not broadcast when pressing the back-button on the browser. Closes #2109
2013-05-01test(ngAnimate): also provide W3C transition property to work on IE10Pete Bacon Darwin
Closes: #2492
2013-04-30feat(ngTap): Add a CSS class while the element is held down.Braden Shepherdson
2013-04-30test(controller): instantiate controller defined on windowVojta Jina
Just adding a missing spec.
2013-04-30fix(ngController): allow dots in a controller nameVojta Jina
The issue was introduced in cd38cbf975b501d846e6149d1d993972a1af0053
2013-04-30feat($httpBackend): add timeout support for JSONP requestsDavid Bennett
Documentation implies that timeout works for all requests, though it only works with XHR. To implement: - Change $httpBackend to set a timeout for JSONP requests which will immediately resolve the request when fired. - Cancel the timeout when requests are completed.
2013-04-29fix(ngController): change controllerAlias to controllerAs.Misko Hevery
2013-04-29test(parse): Test for the parsing not invoking twice to get selfLucas Galfasó
New tests to not call twice a function to get self
2013-04-29fix(jqLite): correct implementation of mouseenter/mouseleave eventgockxml
Implement mouseenter/mouseleave event referring to http://www.quirksmode.org/js/events_mouse.html#link8 and jQuery source code(not dependent on jQuery). The old implementation is wrong. When moving mouse from a parent element into a child element, it would trigger mouseleave event, which should not. And the old test about mouseenter/mouseleave is wrong too. It just triggers mouseover and mouseout events, cannot describe the process of mouse moving from one element to another element, which is important for mouseenter/mouseleave. Closes #2131, #1811
2013-04-29test(browser/compile): fix calls to Jasmine fail()Oren Avissar
The fail() function in Jasmine expects an Error object parameter. Also, there is no global alias for fail() so it must be accessed using `this.fail(new Error())`.
2013-04-25test(location): should not rewrite Html5 deep urlsPete Bacon Darwin
2013-04-24feat($q): add $q.always() methodLaurent Cozic
Add $q.always(callback) method that is always called whether the promise is successful or fails; includes unit tests and updates documentation.
2013-04-22feat(controller): support as instance syntaxMisko Hevery
Support ng-controller="MyController as my" syntax which publishes the controller instance to the current scope. Also supports exporting a controller defined with route: ````javascript angular.module('routes', [], function($routeProvider) { $routeProvider.when('/home', {controller: 'Ctrl as home', templateUrl: '...'}); }); ````