mardi 29 novembre 2016

Ember 2.8 - link to record is always undefined

I have a page for classes list and a page for single class details.

Whatever I try in link-to helper, I always get an url ending with undefined instead of class id.


Router:

this.route('classes');
this.route('class', { path: '/classes/:id' });

I tried also:

this.route('class', { path: '/class/:id' });
this.route('class', { path: '/class/:class_id' });
this.route('class', { path: '/classes/:class_id' });


Emblem template:

=link-to 'class' class

I tried also:

=link-to 'class' class.id
=link-to 'class' class.class_id
=link-to 'class' class.classId


No syntax seems to work. Any clues?




Aucun commentaire:

Enregistrer un commentaire