Reputation: 30152
I've seen this url Ember-cli Pods & Loading Templates but adding a /app/bugs/loading.hbs or /app/bugs/detail/loading.hbs or even /app/bugs/detail/loading/template.hbs doesn't work.
I'm missing something probably easy - any thoughts?
Upvotes: 0
Views: 341
Reputation: 30152
Since the docs don't specifically mention pods and I've seen a few people pose this question on the net using what seems like an older folder structure, I'll answer here.
For my /bugs route I have the following at
./app/bugs/index/route.js
import Ember from 'ember'; export default Ember.Route.extend({ model() { return this.store.findAll('bug'); }, actions: { loading(transition, originRoute) { console.log('loading transition'); console.log(originRoute); //let controller = this.controllerFor('bugs'); //controller.set('currentlyLoading', true); transition.promise.finally(function () { console.log('done loading'); //controller.set('currentlyLoading', false); }); } } });
The loading template it looks for is located at
./app/bugs/index-loading/template.hbs
Upvotes: 1