I use semantic ui and angular (1.4) ui to create an application. I came across a situation where dynamically adding class names using angular results in incorrect rendering, since the ng class seems to rearrange the class names as it sees fit. This is undesirable because semantics expects certain combinations of class names to follow a natural / semantic order. Example:
<div class="ui two column grid"> <div ng-class="wideVersion? 'sixteen wide column': 'fourteen wide column'"></div> </div>
This results in (when the scope wideVersion variable changes) in dom:
<div class="ui two column grid"> <div class="wide column fourteen"></div> </div>
This does not work, because semantics require that the class names correspond to the natural order in this use case. I tried several variations of the ng class, but the result is the same.
thanks
source share