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

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -