angularjs - Hide div if viewbag is true angular MVC -


i have viewbag in mvc controller

viewbag.total = true; 

and want check in razor view angular code , display or hide div

<div ng-show="list" class="divlist">         content here  </div> 

update

 <div ng-show="'@(viewbag.total)'">content</div> 

i have try angular ng if not working razor syntax doesn't work me. idea? thank you

    @{         var total= (string) viewbag.total;      }     <div ng-if="total== 'true'">     </div> 

updated : please check this

@{             var total= (string) viewbag.total;          }         <div ng-if="total">         </div> 

use this


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -