Midhuna
Midhuna

Reputation: 4633

Durandal Routing

I want to send parameter with default route in durandal js.

 { route: '', title: 'Welcome', moduleId: 'viewmodels/welcome', nav: true },

like

{ route: 'test/:id', moduleId: 'viewmodels/test', nav: true },

But unfortunately I can't do it. I want to set the url as 'http://domainname.com/123' where '123' is the paramater(id). 'http://domainname.com/#test/123' is working for me according to the second route. Can anyone please help me.?

Upvotes: 0

Views: 164

Answers (2)

Felipe Quirós
Felipe Quirós

Reputation: 440

Well, actuallly you can handle this if u make your default or home page, an inner page . . . i've done this before and it works.

i know this is not the behavior or the expected approach, but since an argument (or param) belong to something, you should expect a route in order to send a param to it.

Upvotes: 0

aup
aup

Reputation: 810

As far as I know, this is not possible - and it's by design. You can refer to both Durandal's own documentation on the router and also this post in Google Groups where Rob Eisenberg (creator of Durandal) has provided a show answer on the subject himself.

Upvotes: 2

Related Questions