Skip to content

Instantly share code, notes, and snippets.

@jsanta
Created March 9, 2018 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsanta/5a666e393716e27ffdb08a351f8d02de to your computer and use it in GitHub Desktop.
Save jsanta/5a666e393716e27ffdb08a351f8d02de to your computer and use it in GitHub Desktop.
Updated DataGridComponent template to include animations.
<div class="row mt-3">
<div class="col-2 p-1 text-center align-self-center"
[ngClass]="{
'bg-info': item.color === 'blue',
'bg-success': item.color === 'green',
'bg-warning': item.color === 'yellow',
'bg-danger': item.color === 'red',
'bounceIn': filterApplied
}"
[ngStyle]="(filterApplied)?{ 'animation-delay': (150 + gridIdx * 1000 / filteredData.length ) + 'ms' }:{}"
*ngFor="let item of filteredData; let gridIdx = index;">
<strong>{{item.company}}</strong><br>
{{item.country}}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment