Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

Change routes from an older version

$
0
0

@Pop_Levente wrote:

Hi Guys,

we are trying to upgrade our packages within a project and we encoutered an issue with our routes. there is still some resourses used there. example :

Summary
  this.route('objects', function () {
    this.route('search', { path: '/' }, function () {
      this.resource('objects.items', { path: '/:search_id' }, function () {
        this.resource('objects.item', { path: '/item/:item_id'}, function () {
          this.route('general', { path: '/' });
          this.route('tab', { path: '/tab/:tab' });
          this.route('relations');
          this.route('diagram');
          this.route('comments');
          this.route('sources');
          this.route('views');
        });
      });
    });
  });

is there a way we can migrate these routes without doing too much refactoring? please note that the first resourse (this.resource(‘objects.items’, { path: ‘/:search_id’ }), is working like an optional segment. this is the most important thing which we are not managing to migrate accordinly. and to maintain it’s nested routes without duplicating the nested ones. any help is appreaciated.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles