mardi 6 juin 2017

Ember rootURL in templates

I am trying to migrate my app away from baseURL to rootURL router configuration. I am stuck determining which url to use for images stored in public/assets in my templates.

Before I was using assets/images/myimage.png, now I want to do something like assets/images/myimage.png, but injecting it from the route seems rather hacky.

setupController(controller, model) {
    this._super(controller, model);
    this.controllerFor('application').set('rootURL', this.get('router.rootURL'));
}

Is there an established way to do this?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire