【发布时间】:2016-03-16 18:47:21
【问题描述】:
【问题讨论】:
-
请提供一些代码来演示您尝试完成的工作。有很多方法取决于你想要什么。
标签: angular animate.css
【问题讨论】:
标签: angular animate.css
在模板内部使用ngClass,在组件本身上,在@Component() 注解中使用host: {'[class.someClass]':'someExpression'},仅举几例。
【讨论】:
我在阅读官方文档时找到了答案。
这是我的实用工具类:
export class JQueryUtils
{
public static animateCss (selector:string, animationName:string)
{
var jQueryElement = jQuery (selector);
jQueryElement.addClass ('animated ' + animationName).one ('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',
function () {
jQueryElement.removeClass ('animated ' + animationName);
});
}
}
【讨论】: