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
Post a Comment