I have used angularJS and i wonder how to use its if statement like this way. I don't know if my question is right but i just want to explain it through my example.
I have if like this..
<div data-ng-if="book.Availability>0">
<div class="col-xs-12 col-md-12 nopadding" style="border-right:solid 6px blue">
//some html div's here with angularJS
</div>
</div>
<div data-ng-if="book.Availability==0">
<div class="col-xs-12 col-md-12 nopadding" style="border-right:solid 6px red">
//some html div's here with angularJS
</div>
</div>
I have a code like that.. that //some html div's here with angularJS have common codes the only thing that deferent is the red and blue color in the container..
I think it is redundant to use that kind of code.. is it possible to use same that //some html div's here with angularJS for both if?
I tried like this.
<div data-ng-if="book.Availability>0">
<div class="col-xs-12 col-md-12 nopadding" style="border-right:solid 6px blue">
</div>
<div data-ng-if="book.Availability==0">
<div class="col-xs-12 col-md-12 nopadding" style="border-right:solid 6px red">
</div>
`//some html div's here with angularJS`
but there's no output..
Thanks for help..
I know my question is different from what i want.. but i don't really have an idea how to ask it..
ng-if="...", notdata-ng-if="". And it requires an expression, which specifically states conditionals are not allowed. I could be wrong though, I've not messed with it much.