Skip to content

Instantly share code, notes, and snippets.

@yarigpopov
Last active March 24, 2017 09:49
Show Gist options
  • Save yarigpopov/53943098c50c6958182c28856bf69e87 to your computer and use it in GitHub Desktop.
Save yarigpopov/53943098c50c6958182c28856bf69e87 to your computer and use it in GitHub Desktop.
How I would implement toggle for show/hide
<div ng-switch on="selected[$index]">
<a ng-click="selected[$index]=!selected[$index]" href="#">
<div ng-switch-when="true">
Hide
</div>
<div ng-switch-default>
Show
</div>
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment