RobVious
RobVious

Reputation: 12925

Durandal routing not working?

I've got several pages up and working in my project that I can navigate to directly - one for home, another for "folder details". I list Folders on the homepage and I'm now trying to enable navigation to particular folders from the list.

If I navigate to /set I get a default set details page, that works.

If I navigate to /set/1 I get "no route found" from my main.js:

router.handleInvalidRoute = function (route, params) {
                logger.logError('No route found', route, 'main', true);
            };

What is needed to form the link between the id in the URL and the viewModel?

Upvotes: 0

Views: 734

Answers (1)

RobVious
RobVious

Reputation: 12925

I was missing this line in my main.js:

router.mapNav("folder/:id");

Upvotes: 1

Related Questions