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