mardi 10 février 2015

How to get the type of route path in Ember

If I have in the router map:



this.resource('detail', { path: '/detail/:type' }, function() {
...
});


And I retrive the currentPanth in my Ember Application code:



currentPath: '',
ApplicationController : Ember.Controller.extend({
updateCurrentPath: function() {
App.set('currentPath', this.get('currentPath'));
console.log('currentPath',App.currentPath);
}.observes('currentPath')
}),


When I navigate in my app, I get the route names by console, but when It is "detail" I get "detail.index". How can I get the type?





Aucun commentaire:

Enregistrer un commentaire