Last active
March 24, 2017 09:49
-
-
Save yarigpopov/53943098c50c6958182c28856bf69e87 to your computer and use it in GitHub Desktop.
How I would implement toggle for show/hide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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