Questions tagged [durandal-navigation]

using the router plugin, and other navigation-related questions about DurandalJS

Related links

DurandalJS router plugin documentation: http://durandaljs.com/documentation/api.html#module/router

94 questions
1
vote
1 answer

How can I cancel the ongoing navigation?

I'm trying to prevent navigating to most of my sites' pages when user is not yet logged in. So this is the code I started to write to solve that issue: router.on("router:navigation:processing", function (instruction, usedRouter) { if…
chrisdot
  • 659
  • 6
  • 19
1
vote
1 answer

How to combine optional parameter route with static route on the same name (Durandal router)

I have working router configured inside shell.js: router.map([ { route: 'messages', moduleId: 'views/messages', nav: true }, { route: 'messages/create', moduleId: 'views/messagesCreate', nav: true }, ]).buildNavigationModel(); What i want to do…
Fariz Azmi
  • 713
  • 1
  • 6
  • 21
1
vote
3 answers

How to use durandal router to activate dialogs?

I would love to a #signin route that would open a dialog on top of whatever page there was before. Let's consider this example app this the following routes: router.map([ {route: '', moduleId: 'vm/home', title: "Home"}, {route: 'about',…
Dziamid
  • 11,225
  • 12
  • 69
  • 104
1
vote
0 answers

DurandalJS: Create childRouter inside widget?

It's possible to create childRouter inside the widget that can be re-used in other page again by using a widget? This is how my directory tree looks like: * app * views * dashboard (route: /dashboard) - dashboard.html -…
Fariz Azmi
  • 713
  • 1
  • 6
  • 21
1
vote
1 answer

How can I have a seperate login page using Durandal that has a different layout then the shell?

I've read through Durandal login page redirect pattern wow, lots of code to do what I'd think would be pretty simple. I've also read through https://groups.google.com/forum/#!topic/durandaljs/RdGpwIm1oOU as I'd like the login page to have a simple…
rball
  • 6,925
  • 7
  • 49
  • 77
1
vote
1 answer

Deactivate composed viewmodel

There is a lot of questions about this but I cannot find any answer that works with the latest durandal version (2.1.0). I am showing a child viewmodel inside my page using this:
Leo
  • 7,379
  • 6
  • 28
  • 44
1
vote
2 answers

How to use google universal analytics in Hot Towel durandal SPA + typescript

I'm building app based on Hot Towel Template. Fall into issue with Google Analytics. I'm completly new in that and here is what i've done so far: 1) registered in google analytics account 2) in my index.cshtml file just before closing tag i…
1
vote
1 answer

Durandal router - how to define view as modal in routes definition

How can I declare view to be opened as modal directly on click? My route's definition is: var routes = [ { route: '', moduleId: 'home', title: 'My Apps', nav: true }, { route: 'aboutus', moduleId: 'aboutus', title: 'About Us', nav: true }, …
1
vote
1 answer

Errors in Durandal activate function

I've been struggling with error handling in durandal. I've found it is desirable to to place much much of the logic for rendering views etc in the activate function. This was working well untill I noticed a few programming errors caused the whole…
Captain John
  • 1,859
  • 2
  • 16
  • 30
1
vote
1 answer

how to defime routing for multiple subviews

I am developing and application using durandal. I have two sections in my page with different navigation menu. I am using composition to keep make these subviews. But I am not sure how to define routes for these sections.
1
vote
0 answers

Durandal child router's activeItem is not changing unless I bind router to a view

I have a child router setup for one of my viewModels using durandal. However, I can't read router's activeModule when the router is navigating to the second child route unless I also compose a view corresponding to the child route. Can anyone…
1
vote
1 answer

Durandal child router setup with relative moduleId

I am trying to configure Durandal child routing. I have a public section for witch the parent router is responsible: //main router return router.map(config.publicRoutes) .buildNavigationModel() .mapUnknownRoutes('account/login',…
Razvan
  • 3,017
  • 1
  • 26
  • 35
1
vote
1 answer

How to dynamically display tabs for routes in Durandal?

This is a two part question. Am very new to durandal and knockout. Using the HTML Starter Kit example for Durandal 2.0.1. I add a route for customers/:id with my own vm and view with nav = false { route: 'customer/:id', moduleId:…
1
vote
2 answers

Intercept route navigation and ask user "are you sure you wish to leave this page?"

I have a Durandal app that allows the user to update various bits of profile information. For some bits of data, the user must click "save" to indicate they want to save their changes. In the event that the user attempts to navigate away from the…
Josh
  • 7,232
  • 8
  • 48
  • 75
1
vote
1 answer

DurandalJS navigations events

I have a Durandaljs application. I want to have a back button in shell view that should be hidden depends on which view is activated now. What is the easiest way to detect navigation event in shell viewmodel to change back button visibility state? …
alexxjk
  • 1,681
  • 5
  • 18
  • 30