Click here to Skip to main content
15,747,908 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am learning durandal.js in MVC

I have a solution file where I am having multiple projects.

project Structure
                       |---View (html pages)
                       |---ViewModels (js)
                       |---View (html pages)
                       |---ViewModels (js)
          |---View (html pages)
          |---ViewModels (js)

Now as durandal uses shell as a master page, I want all the projects(Project1, Project2) to share the shell.js from the commonProject.

And in the compose binding we will pass the view to the shell in the common folder from Project1 (or Project2).

I don't know how do I achieve this.

Any help is appreciated.

What I have tried:

created a 3 projects

In Project1/App/main.js

paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions',
'Common': '../../../Common'

and in app.start()
app.setRoot('Common/viewmodels/shell', 'entrance');

Set Project1 as startup.

This gives as 404 and cannot find the mentioned common shell file.

I am not sure if this approach is correct.
Updated 18-Jul-16 4:08am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900