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

Lists in Python -

android - can not access to progress bar in an other activity -

html - Not able to access next element of an array javascript -