Skip to content

Instantly share code, notes, and snippets.

@aaronfrost
Last active August 29, 2015 14:02
Show Gist options
  • Save aaronfrost/81763664d42669b2f189 to your computer and use it in GitHub Desktop.
Save aaronfrost/81763664d42669b2f189 to your computer and use it in GitHub Desktop.
example of ng-show/ng-hide that is bad
<div class="big-section">
<div ng-if="archiveMode">
<div class="header">
<i class="archive-icon"></i>
</div>
<div>
<span>{{description}}</span>
</div>
<button ng-click="unarchive()">Unarchive</button>
</div>
<div ng-if="!archiveMode">
<div class="header">
<i class="active-icon"></i>
</div>
<div>
<textarea ng-model="description"></textarea>
</div>
<button ng-click="save()">Save</button>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment