mardi 31 janvier 2017

EmberJS 2.0 How to avoid Dynamic Segments On route to be always undefined?

I want to access to the dynamic segment on a route but the params are always undefined.

I have the next route defined on the router:

this.route('send', {path: '/send/:solName/:id/:userId'}, function() {});

And In my route I have this:

    export default Ember.Route.extend({
        model: function (params){

        console.info(params);

        return {
             solName: params.solName,
             id: params.id,
             userId: params.userId
         }

        }
      });

Any idea why the params are always undefined?




Aucun commentaire:

Enregistrer un commentaire