AngularJS ng-if to determine which col-md to use -
i have line this:
<div class="col-md-6" ng-if="user.cobuyer">
user.cobuyer either true or false, if false, want col-md-6 col-md-12, if true can col-md-6
how this?
use ng-class
ternary this, don't use ng-if
.
<div ng-class="user.cobuyer ? 'col-md-6' : 'col-md-12">
Comments
Post a Comment