.... If I would like to use one-" /> .... If I would like to use one-" /> .... If I would like to use one-"/>

Angular: one-time-binding for ngClass with multiple values

356 views Asked by At

I would like to use one-time binding for the following situation

<div ng-class="{a: someValueA, b: someValueB}">....</div>

If I would like to use one-time binding for the whole expression I know you can do

<div ng-class="::{a: someValueA, b: someValueB}">....</div>

However, in my case I only want to use one-time binding just for one of the two. Lets assume that I only want to use one-time binding for someValueA, I've tried the following

<div ng-class="{a: ::someValueA, b: someValueB}">....</div>

or

<div ng-class="[::{a: someValueA}, {b: someValueB}]">....</div>

None of them work (errors) Any suggestions how to do this?

0

There are 0 answers