Skip to content

Adding new routes after app.start() #69

@cnizzardini

Description

@cnizzardini

Hello,

I am attempting to add a new route after I've started davis. I do this by adding davis to a parent object which is in the global scope, then later on in my application I called the following code:

var me = this;
Core.davis.get('/retread_templates/view/:id', function(){
    me.view(req.params['id']);
})

But when I click a link that looks like /retread_templates/view/40 the browser natively navigates to that location. Am I not supposed to be doing this? Should I define all routes when I create the initial instance? What is the best practice here?

Great library by the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions