Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(loading): support for async and boolean with [until] input. (closes #528) #583

Merged
merged 7 commits into from
May 15, 2017

Conversation

emoralesb05
Copy link
Contributor

@emoralesb05 emoralesb05 commented May 11, 2017

#528

introducing a new syntax to use the tdLoading directive which lets the users leverage the async angular pipe and assign a reference from the result to use within the context.

also leveraging this, we can use booleans to show and hide anonymous loading directives.

What's included?

  • new [tdLoadingUntil] input to support both async and boolean cases.
  • new syntax to use with tdLoading for until usage:
// template syntax
<ng-template let-items tdLoading [tdLoadingUntil]="listObservable | async">
   {{items}}

OR

// star syntax
<div *tdLoading="let items until listObservable | async; type: circle; color: accent">
   {{items}}
  • usage for boolean case:
<ng-template tdLoading [tdLoadingUntil]="!loading" tdLoadingStrategy="overlay">
  • Updated unit tests and documentation

Test Steps

General Tests for Every PR

  • ng serve --aot still works.
  • npm run lint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
Screenshots or link to CodePen/Plunker/JSfiddle

loading-until-demo-async
loading-until-demo-boolean

introducing a new syntax to use the tdLoading directive which lets the users leverage the async angular pipe and assign a reference from the result to use within the context.

also leveraging this, we can use booleans to show and hide annonymous loading directives.
@kyleledbetter kyleledbetter merged commit d57bf67 into develop May 15, 2017
@kyleledbetter kyleledbetter deleted the feature/loading-until branch May 15, 2017 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants