aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive
AgeCommit message (Collapse)Author
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-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(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-01test(ngAnimate): also provide W3C transition property to work on IE10Pete Bacon Darwin
Closes: #2492
2013-04-29fix(ngController): change controllerAlias to controllerAs.Misko Hevery
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: '...'}); }); ````
2013-04-19feat(ngIf): add directive to remove and recreate DOM elementsOren Avissar
This directive is adapted from ui-if in the AngularUI project and provides a complement to the ngShow/ngHide directives that only change the visibility of the DOM element and ngSwitch which does change the DOM but is more verbose.
2013-04-17fix(ngModel): use paste/cut events in IE to support context menuMark Dalgleish
In IE the model is not updated when the input value is modified using the context menu, e.g. pasting from the clipboard, or cutting all or part of the current value. To capture these changes, we bind to the proprietary 'paste' and 'cut' events. Closes #1462
2013-04-16fix(ngPattern): allow modifiers on inline ng-patternaustingreco
Add support for regex modifiers on inline `ng-pattern`. `ng-pattern="/regex/i"` now validates correctly. Closes #1437
2013-04-16fix(ngClass): should remove classes when object is the same but property has ↵Pete Bacon Darwin
changed If you wire up ngClass directly to an object on the scope, e.g. ng-class="myClasses", where scope.myClasses = { 'classA': true, 'classB': false }, there was a bug that changing scope.myClasses.classA = false, was not being picked up and classA was not being removed from the element's CSS classes. This fix uses angular.equals for the comparison and ensures that oldVal is a copy of (rather than a reference to) the newVal.
2013-04-11fix(ngAnimate): prevent animation on initial page loadMisko Hevery
2013-04-11fix(ngRepeat): prevent initial duplicatesMisko Hevery
2013-04-11fix(ngAnimate): skip animation on first renderMatias Niemelä
2013-04-02feat(ngAnimate): add support for animationMisko Hevery
2013-03-29feat(ngRepeat): add support for custom tracking of itemsMisko Hevery
BREAKING CHANGE: It is considered an error to have two items produce the same track by key. (This was tolerated before.)
2013-03-27feat(http): support request/response promise chainingSylvester Keil
myApp.factory('myAroundInterceptor', function($rootScope, $timeout) { return function(configPromise, responsePromise) { return { request: configPromise.then(function(config) { return config }); response: responsePromise.then(function(response) { return 'ha!'; } }); } myApp.config(function($httpProvider){ $httpProvider.aroundInterceptors.push('myAroundInterceptor'); });
2013-03-14Fix failing test in IE 10Shyam Seshadri
2013-03-11feat(ng:switch): Preserve the order of the elements not in the ng-switchLucas Galfasó
Preserve the order of the elements that are not part of a case nor default in a ng-switch directive BREAKING CHANGE: elements not in the ng-switch were rendered after the ng-switch elements. Now they are rendered in-place. Ng-switch directives should be updated with non ng-switch elements in render-order. e.g. The following was previously rendered with <li>1</li> after "2": <ul ng-switch="select"> <li>1</li> <li ng-switch-when="option">2</li> </ul> To keep the old behaviour, say: <ul ng-switch="select"> <li ng-switch-when="1">2</li> <li>1</li> </ul> Closes #1074
2013-03-08feat(directive): add ngKeypress directive for handling keypress eventMark Nadig
2013-02-18fix(ngClass): keep track of old ngClass value manuallyPer Rovegård
ngClassWatchAction, when called as a $watch function, gets the wrong old value after it has been invoked previously due to observation of the interpolated class attribute. As a result it doesn't remove classes properly. Keeping track of the old value manually seems to fix this. Closes #1637
2013-02-18fix(compile): should not leak memory when there are top level empty text nodesPete Bacon Darwin
The change to prevent <span> elements being wrapped around empty text nodes caused these empty text nodes to have scopes and controllers attached, through jqLite.data() calls, which led to memory leaks and errors in IE8. Now we exclude all but document nodes and elements from having jqLite.data() set both in the compiler and in ng-view. Fixes: #1968 and #1876
2013-02-14feat(ngSwitch): support multiple matches on ngSwitchWhen and ngSwitchDefaultLucas Galfasó
Closes #1074
2013-02-14fix(a): workaround IE bug affecting mailto urlsIgor Minar
Apparently there is a really weird bug in IE6-8 that causes anchor textContent to be reset with href content when both contain @ symbol. Inserting a bogus comment node into all anchor elements in IE works around this browser bug. I'm fixing the issue via directive because that way we'll fix it for jQuery as well. I fixed an e2e test too because it was incorrect. Closes #1949
2013-01-18feat(directive): added ng-open boolean directiveDavid Chang
Closes# 1797 add ng-open attribute
2013-01-18fix(ngSwitch): don't leak when destroyed while not attacheddanilsomsikov
The leak can occur when ngSwich is used inside ngRepeat or any other directive which is destroyed while its transcluded content (which includes ngSwitch) is not attached to the DOM. Refactor ngSwitch to use controller instead of storing data on compile node. This means that we don't need to clean up the jq data cache. Controller reference is released when the linking fn is released. Closes #1621
2013-01-17fix(ngRepeat): correctly apply $last if repeating over objectPete Bacon Darwin
If the $last property is calculated from the original collectionLength on an object and properties starting with $ were filtered out, then $last is never applied and $middle is applied erroniously. Closes #1789
2012-12-18feat(directive): ng:keydown, ng:keyupMark Nadig
New directives for binding to keydown and keyup events. Closes #1035
2012-12-05fix(select): support optgroup + select[multiple] combo_pants
Closes #1553
2012-11-26fix(ngRepeat): support mostly-stable repeating for primitivesIgor Minar
I'm reverting changes that were originally done to ngRepeat to fix #933, because these are now not necessary after the previous changes to keep ngModel always synced with the DOM.
2012-11-26test(ngRepeat): clean up and improve testsIgor Minar
2012-11-26test(ngRepeat): add test for issue #1076Igor Minar
2012-11-26feat(form): add ability to reset a form to pristine statePawel Kozlowski
Retting a form to pristine state will cause all of the nested form and form controls to be recursively reset as well. Closes #856
2012-10-31fix(select): select option with a label of 0 is not shownSudhir Jonathan
Bug caused by the use of the `||` operator to replace all non-truthy values with an empty string. Changed to replace only `undefined` values. Closes #1401
2012-09-06fix(FormController): propagate dirty state to parent formsKai Groner
2012-09-06fix(ngSrc): don't set src if value is empty stringXiangru Chen
Current implementation of ngSrc may lead to empty src attribute when page is loading. For example: <img ng-src="{{image.url}}"> can be temporarily rendered as <img src=""> before the image resource is loaded. Some browser emits a request to the current page when seeing <img src=""> (Firefox13 and IE8 will, Chromium20 won't), which leads to performance problems.
2012-09-06feat(ngModel): support ngTrim attribute on inputGregory Pike
2012-09-06fix(ngClassEven/Odd): filtering/ordering and repeaterpetrovalex
Closes #1076
2012-09-06fix(ngClass): works with class interpolationMax Martinsson
Closes #1016
2012-09-06fix(ngRepeat): now works with primitive typesZhenbo Zhang
closes #933
2012-08-31revert: fix(ng-repeat) to work with primitive typesIgor Minar
this was accidentaly merged in. the commit is not ready yet and we don't have CLA signature. This reverts commit 98d489712eff7559bce87ae53bd242112a875c1a.
2012-08-30fix(ng-repeat) to work with primitive typesZhenbo Zhang
2012-08-13fix(ngPluralize): fixes ng-pluralize when using non-standard start/end symbolsBrian Ford
Closes #1134
2012-08-13style(ngPluralizeSpec): fix indentationIgor Minar
2012-08-10fix(option): support option elements in datalistIgor Minar
previously we expected to find option elements only within select element and if that was not the case we throw an error. This made it impossible to include datalist element with nested option elements in the template. Closes #1165
2012-08-10fix(form): prevent page reload when form destroyedIgor Minar
this fix ensures that we prevent the default action on form submission (full page reload) even in cases when the form is being destroyed as a result of the submit event handler (e.g. when route change is triggered). The fix is more complicated than I'd like it to be mainly because we need to ensure that we don't create circular references between js closures and dom elements via DOM event handlers that would then result in a memory leak. Also the differences between IE8, IE9 and normal browsers make testing this ugly. Closes #1238
2012-08-07test(form): fix broken preventDefault testIgor Minar
the original test relied on incorrect assumptions about how jasmine async tests work (when setTimeout is triggered) and how browser reloads a page (the sequence of events) and thus the test passes even when the default is not prevented. this change fixes the test by registering an extra submit event handler that checks if the default was prevented. if the default was not prevented, the test will fail and the page will be reloaded causing the test runner to panic.
2012-08-07refactor(formSpec): group preventDefault specs into a describeIgor Minar
2012-06-08feat($compile): simplify isolate scope bindingsMisko Hevery
Changed the isolate scope binding options to: - @attr - attribute binding (including interpolation) - =model - by-directional model binding - &expr - expression execution binding This change simplifies the terminology as well as number of choices available to the developer. It also supports local name aliasing from the parent. BREAKING CHANGE: isolate scope bindings definition has changed and the inject option for the directive controller injection was removed. To migrate the code follow the example below: Before: scope: { myAttr: 'attribute', myBind: 'bind', myExpression: 'expression', myEval: 'evaluate', myAccessor: 'accessor' } After: scope: { myAttr: '@', myBind: '@', myExpression: '&', // myEval - usually not useful, but in cases where the expression is assignable, you can use '=' myAccessor: '=' // in directive's template change myAccessor() to myAccessor } The removed `inject` wasn't generaly useful for directives so there should be no code using it.
2012-06-02doc(NgModelController) add example and $render documentationMisko Hevery
Closes#930