lundi 25 juin 2018

Ember JS - routing from resourse to route

i'm trying to update and ember project from version 2.x to version 3.x, and one of my first issue is that in the route file i get this.resouce is not defined. i belive this was deprecated. the code looks like this :

  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');
        });
      });
    });
  });

i've tried to simply change the resource to route and give resetNameSpace: true attribute, but didn't help. also i've tried various combinations, but without luck. anyone with experience can help me redo this routing to be compatible with the latest ember?

thanks!




Aucun commentaire:

Enregistrer un commentaire