Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我有一个这样的玉片
.statusbox h5 {{status}}
这相当于
<h5 class = "statusbox"> {{status}} </h5>
两个问题:
非常感谢!
莱昂
ng-class 可以正常工作,假设您使用的是 CSS3 动画。
<h5 class="statusbox" ng-class="{ 'animate-class' : foo }">{{status}}</h5>
然后,每当您设置$scope.foo = true它时,它都会将该类添加animate-class到您的h5. 如果您的 CSS3 动画设置正确,它应该会生成动画。
$scope.foo = true
animate-class
h5