I have 3 SPAs within one bigger project written by DuraldalJS (called A). Can A has 3 shell.js to load for each SPA? Thanks.
This is possible. You can create three files, eg shellA.js, shellB.js and shellC.js.
Per SPA you must create a server page, eg IndexA.html, IndexB.Html and IndexC.html.
You can create a global javascript settings object in each page:
<script>
var mySettings = mySettings || {};
mySettings.entrance = 'viewmodels/shellA';
</script>
<script src="/js/requirejs/require.js" data-main="/app/main"></script>
In main.js you can configure your Durandal app like so:
var mySettings = mySettings || {};
app.setRoot(mySettings.entrance, 'entrance');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.