How to conditionally add a data attribute to a div in angularjs -
my code:
<div>something here</div> when condition true, eg: data.nextdiv == true
the code changed follow:
<div myattr >something here</div> my attempt:
<div ng-attr-myattr ="{{data.nextdiv == true ? null : null}}" >something here</div> but, fail, 'myattr' still printed out condition false.
anyone help?
Comments
Post a Comment