Как мне получить путь к маршруту?
Учитывая следующие настройки маршрутизатора:
App.Router.map(function() {
this.resource('posts', function() {
this.route('new');
this.resource('post', { path: ':post_id' }, function() {
this.route('edit');
});
});
});
Можно ли получитьдорожка маршрута?
Вымышленный пример:
App.Router.get('path', 'posts.new'); //=> "/posts/new"
Или с моделью, как:
App.Router.get('path', 'post.edit', model); //=> "/posts/1/edit"