Skip to content

Instantly share code, notes, and snippets.

@amcdnl
Last active June 27, 2017 19:48
Show Gist options
  • Save amcdnl/31c4d8356ac2ebc4ca3bb9a7cee19fcf to your computer and use it in GitHub Desktop.
Save amcdnl/31c4d8356ac2ebc4ca3bb9a7cee19fcf to your computer and use it in GitHub Desktop.
<ng-template ngFor let-resource [ngForOf]="resources">
<li>
<button (click)="resource.expanded = !resource.expanded">Open</button>
</li>
<li *ngIf="resource.expanded">
Something fancy here
</li>
</ng-template>
<li ng-repeat-start="resource in resources">
<button ng-click="resource.expanded = !resource.expanded">Open</button>
</li>
<li ng-repeat-end="" ng-show="resource.expanded">
Something fancy here
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment