My first ember addon

29 Mar

My ember projects are structured using PODs, it means routes are located like that:

app\
app\contacts\route.hbs
app\contacts\styles.scss
app\contacts\template.hbs

I really like that all relevant files are under the same folder.
unfortunately the default ember resolver expect the ‘loading’ and ‘error’ state templates to be located at:

app\contacts-loading\template.hbs
app\contacts-error\template.hbs

I didn’t like it since I wanted to keep a clean structure.

After a few hours of digging in the Ember source code I wrote my first Ember addon.
The addon will extend the default ember resolver and now I can place the loading and error states like that:

app\contacts\loading\template.hbs
app\contacts\error\template.hbs

You can find more info at:

https://www.npmjs.com/package/ember-pod-states-resolver

Leave a Reply

Your email address will not be published. Required fields are marked *