I need to show the tag <a>. But depending on whether the value exists or not, I need to set href.
This is what I have:
<a ng-show="source.element!=0" "href="#/resource/{{source.a}}/{{source.b}}/val">
{{source.element}})
</a>
<a ng-show="source.element==0" "href="">{{source.element}}</a>
If source.elementequal to 0, then nothing should happen when you click on the value source.element( href="")
Else, the page should be redirected according to href.
Is there a better way to do this since this duplicate code?
Thanks..
source
share