Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Durandal's router has support for hash based parameter, but not for activationData <a href="http://durandaljs.com/documentation/Using-The-Router/" rel="nofollow">http://durandaljs.com/documentation/Using-The-Router/</a>. Assuming a route like <code>customer/:customerId/orders/:orderId</code> would allow retrieving <em>activationData</em> during <code>activate</code> e.g. </p> <pre><code>function activate(customerId, orderId){ //retrieve activationData from backend based on customerId and/or orderId } </code></pre> <p><strong>Updated</strong> based on comments </p> <p><a href="http://durandaljs.com/documentation/Conversion-Guide/" rel="nofollow">http://durandaljs.com/documentation/Conversion-Guide/</a></p> <blockquote> <p>The new router now not only supports parameterized routes, but also optional parameters, splats and query strings. </p> </blockquote> <p>There's no activationData support when using the router as all information needs to be passed in as URL hash values. The recommended way to deal with that situation is to retrieve the data during <code>activate</code> based on the params passed in (see above).</p> <p>As an alternative composition without the router could be considered. If the composed model needs to support the full life-cycle events (normally provided by the router) you'd have to use your own <code>activator</code>.</p> <p><a href="https://github.com/dFiddle/dFiddle-2.0/blob/gh-pages/app/masterDetail/wizard2/wizard.js#L10" rel="nofollow">https://github.com/dFiddle/dFiddle-2.0/blob/gh-pages/app/masterDetail/wizard2/wizard.js#L10</a></p> <pre><code>define(['durandal/activator', './step', 'knockout'], function( activator, Step, ko ) { var ctor = function( options ) { ... this.activeStep = activator.create(); ... }; return ctor; }); </code></pre> <p>Live version: <a href="http://dfiddle.github.io/dFiddle-2.0/#master-detail/wizard2" rel="nofollow">http://dfiddle.github.io/dFiddle-2.0/#master-detail/wizard2</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload