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

Pass object to non-dynamic route

$
0
0

@kfuzaylov wrote:

Hi there,

I cannot find any information about how to pass any object to non-dynamic route. I have the following route

this.route('entity', {path: '/:entity_id'}, function() {
    this.route('config', function() {});
});

And in entity template.hbs I have button to open its config and pass config object (it is not ember model) to that route

actions: {
    openConfig() {
        const config = this.createConfig();

        this.transitionToRoute('config', config);
    }
}

And in config route.js I want to get this object

model() {
    // Idk how to get that object here and is it possible?
}

The reason why I want to make like that because entity has big logic and I want to split it by sub-routes to make support easier.

Thank you!

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles