这就是我所拥有的:
ng-class="color"
我有颜色变量的问题。它包含已定义颜色的字符串值,但我无法将其传递给HTML。
顺便说一下,
class gameViewController : UIViewController {
func loadContent() {
// this method should refresh content everytime.
}
}
工作正常。
答案 0 :(得分:2)
如果loadingIsOn
为真,且color
为“绿色”,并且您需要class="loading, green"
,那么您需要的只是
ng-class="[{loading:loadingIsOn}, color]"