Search code examples
hottowel

Create a link to another page in hot towel


How to create a link to another page in hot towel ?

I know that to add a link to the menu, I have to add it here :

function boot() {
    router.mapNav('home');
    router.mapNav('details');
    router.mapNav('about');
    log('Hot Towel SPA Loaded!', null, true);
    return router.activate('home');
}

But how to link to one of these links from an html page ?


Solution

  • From within your app, your link would be something like:

    <a href='#/details'>go to details</a>
    

    Otherwise you can use Durandal from your view model:

    router.navigateTo('#/details');