|
|
|
|
|
by holler
2228 days ago
|
|
for things like loading state with ember we use a library called ember-concurrency that uses the generator approach. It's very nice! Example you can create some "task" (promise-like), then in a template you have automatic access to it's state so e.g. ```
{{#if this.fetchStoriesTask.isRunning}}
loading...
{{else}}
<span>Loaded 10 Stories</span>
{{/if}}
```
https://github.com/machty/ember-concurrency |
|