dafriskymonkey
dafriskymonkey

Reputation: 2189

DurandalJS 2.0.0 : where is "settings" in the new router?

I'm trying to convert my app from durandal 1.x to 2.0.0.

In the 1.x i can map routes using this code :

router.map([
    { url: 'home',
      moduleId: 'viewmodels/home/home',
      name: 'Home',
      visible: true,
      settings: { mySettings: ['mySettings'] }
    }, 
    ...
]);

Is there any way to do the same in 2.0.0 : adding 'settings' to a route ??

Thanks very much.

Upvotes: 0

Views: 82

Answers (1)

dafriskymonkey
dafriskymonkey

Reputation: 2189

I misunderstood the docs, the answer is :

router.map([
{ route: 'home',
  moduleId: 'viewmodels/home/home',
  title: 'Home',
  nav: true,
  mySetting: ['mySetting']
}, 
...
]);

Upvotes: 1

Related Questions