ng-if is commenting out when the application is running how can i resolve it [Resolved]

Posted by Kasani007 under AngularJS on 3/28/2017 | Points: 10 | Views : 207 | Status : [Member] | Replies : 1
ng-if is commenting out when the application is running how can i resolve it

<td ng-if="((product.Status) == 'PENDING') && (((product.BookName | uppercase).includes('TECHNOLOGY')) || ((product.BookName | uppercase).includes('SCIENCE')) || ((product.BookName | uppercase).includes('MANAGEMENT')))">
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#ModalPopup" ng-click="ProductInfo(product)">{{product.Status}}</button>
</td>




Responses

Posted by: Kasani007 on: 3/31/2017 [Member] Starter | Points: 25

Up
0
Down

Resolved
This is happened because of product.Status = 'Pending' is getting as i had given 'PENDING' only capital letters..
So this returns false .. so it is not showing at Run time in browser..
I had added uppercase to product.Status i.e., (product.Status | uppercase) == 'PENDING').
Now it is showing in the browser and works fine.


Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response