aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngClassSpec.js
AgeCommit message (Collapse)Author
2014-02-24perf($animate): use rAF instead of timeouts to issue animation callbacksMatias Niemelä
2014-02-14fix($animate): ensure $animate doesn't break natural CSS transitionsMatias Niemelä
BREAKING CHANGE: ngClass and {{ class }} will now call the `setClass` animation callback instead of addClass / removeClass when both a addClass/removeClass operation is being executed on the element during the animation. Please include the setClass animation callback as well as addClass and removeClass within your JS animations to work with ngClass and {{ class }} directives. Closes #6019
2014-02-06fix(mocks): rename mock.animate to ngAnimateMock and ensure it contains all ↵Matias Niemelä
test helper code for ngAnimate Closes #5822 Closes #5917
2014-02-06fix(mocks): remove usage of $animate.flushNext in favour of queingMatias Niemelä
The flushNext method of testing is difficult and highly coupled with the behavior of ngAnimate's $animate workflow. It is much better instead to just queue all $animate animation calls into a queue collection which is available on the $animate service when mock.animate is included as a module within test code.
2013-11-25fix(ngAnimate): ensure animations are disabled upon bootstrap for structrual ↵Matias Niemelä
animations Closes #5130
2013-11-21fix($compile): ensure CSS classes are added and removed only when necessaryMatias Niemelä
When $compile interpolates a CSS class attribute expression it will do so by comparing the CSS class value already present on the element. This may lead to unexpected results when dealing with ngClass values being added and removed therefore it is best that both compile and ngClass delegate addClass/removeClass operations to the same block of code.
2013-11-20fix(ngClass): ensure that ngClass only adds/removes the changed classesMatias Niemelä
ngClass works by removing all the former classes and then adding all the new classes to the element during each watch change operation. This may cause transition animations to never render. The ngClass directive will now only add and remove the classes that change during each watch operation. Closes #4960 Closes #4944
2013-11-08fix(ngClassSpec): clear animation enable fn from postDigestQueuePete Bacon Darwin
2013-10-09feat(ngRepeat): use block separator commentsjankuca
Issue: multi-elements ng-repeat (ng-repeat-start, ng-repeat-end) can contain elements with a trancluding directive. This directive changes content of the row (template) and ng-repeat does not work correctly (when removing/moving rows), because ng-repeat works with the original template (elements). This changes ng-repeat behavior to traverse the DOM to find current elements everytime we are moving/removing rows (if the template has multiple elements). Closes #3104
2013-09-03fix(ngAnimate): ensure that ngClass is always compiled before enter, leave ↵Matias Niemelä
and move animations Closes #3727 Closes #3603
2013-09-03fix(ngAnimate): cut down on extra $timeout callsMatias Niemelä
2013-08-02chore(ngMock): rename $animate.process to $animate.flushNext()Matias Niemelä
2013-07-29fix(ngClass): ensure ngClass doesn't fire addClass or removeClass with an ↵Matias Niemelä
empty string If ngClass fires off an add- or removeClass whilst the opposite animation is going on then the animation will be skipped. The default behavior of ngClass was executing remoteClass with an empty string while addClass had just fired. This commit fixes that bug.
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-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-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
2012-09-06fix(ngClassEven/Odd): filtering/ordering and repeaterpetrovalex
Closes #1076
2012-09-06fix(ngClass): works with class interpolationMax Martinsson
Closes #1016
2012-04-09chore(tests): rename all directive names to the normalized formIgor Minar
2012-03-28chore(module): move files around in preparation for more modulesMisko Hevery