From 5a1e0973829287def6e6a72e24b5bc4558f7f4d2 Mon Sep 17 00:00:00 2001 From: Dan Knutsen Date: Fri, 5 Apr 2019 09:59:09 -0500 Subject: [PATCH] Badge and better example format in README --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index da56487..8823a68 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,29 @@ ember-needs-async ============================================================================== [![Build Status](https://travis-ci.org/dknutsen/ember-needs-async.svg?branch=master)](https://travis-ci.org/dknutsen/ember-needs-async) +[![npm version](https://badge.fury.io/js/ember-needs-async.svg)](http://badge.fury.io/js/ember-needs-async) +[![Ember Observer Score](http://emberobserver.com/badges/ember-needs-async.svg)](http://emberobserver.com/addons/ember-needs-async) + Lightweight provider component and helpers that allow declarative, composable async data fetching and async-aware rendering in just a template. The component waits for an async task and yields the results as well as loading and error states. It can also be used with any ember-concurrency task. The helpers provide shorthand concurrency task wrappers around common Ember Data operations. Example: ```
- - {{#states.loading}} + + - {{/states.loading}} - - {{#states.error as |error|}} + + + There was an error loading the user
{{error}}
- {{/states.error}} - - {{#states.loaded as |user|}} +
+ + {{user.fullName}} profile picture
{{user.firstName}} {{user.lastName}}
{{user.jobTitle}} at {{user.company}}
- {{/states.loaded}} +
```