I am learning durandal.js in MVC
I have a solution file where I am having multiple projects.
project Structure
MainSolution
---Applications(Folder)
|---Project1(csproj)
|---App
|---View (html pages)
|---shell.html
|---ViewModels (js)
|---shell.js
|---main.js
|---Project2(csproj)
|---App
|---View (html pages)
|---shell.html
|---ViewModels (js)
|---shell.js
|---main.js
---CommonProject(csproj)
|---App
|---View (html pages)
|---shell.html
|---ViewModels (js)
|---shell.js
|---main.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
Project1
Project2
Common
In Project1/App/main.js
require.config({
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.