krasimir/navigo

Trigger router on page load ?

panpansh opened this issue · 2 comments

// load page href = http://127.0.0.1:8080/test/2
router.on('/test/2', function () {
    console.log('test 2');
});

is there a way to auto trigger data-navigo at first load please (without link click) ?
Regards.

// load page href = http://127.0.0.1:8080/test/2
router.on('/test/2', function () {
    console.log('test 2');
}).resolve();

just need to add ".resolve();"
Regards.