angularjs - how to use element attribute value to show / hide div in angular js -


i want show div based value of div's attribute values.

<div ng-show="" data-views="{{viewstate}}" id="question_id_{{questionid}}"  >aaa</div> 

i want below

 <div ng-show="data-views" data-views="{{viewstate}}" id="question_id_{{questionid}}" > 

how pass data-views attribute value ng-show=""

is possible

better way show hide take scope variable in controller , use below if value boolean otherwise use conditions in ng-show.

$scope.viewstate =true/false;

<div ng-show="viewstate" data-views="{{viewstate}}" id="question_id_{{questionid}}" > 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -