Quantcast
Viewing all articles
Browse latest Browse all 4827

Render template from outside of templates folder

@Caltor wrote:

How can I render a template that lives outside of the templates folder please?

At the moment I have a templates/cases/create-update.hbs and the following route.js
import Ember from 'ember';

export default Ember.Route.extend({
    templateName: 'cases/create-update'
});

However if I move this template to /packaging/cases/create-update.hbs and change my route.js as follows I get a blank page.
import Ember from 'ember';

export default Ember.Route.extend({
    templateName: '/packaging/cases/create-update'
});

It seems I can only specify templates inside of the template folder. Is that right? That seems a shame as I am using the PODs structure so that all of my related routes, controllers and templates live together and this seems to break that structure. I realise I can use the default template but I want two routes to share a template.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4827

Trending Articles