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

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -