I am just getting started with Durandal.js so excuse me for the silly quesstion...
When a user makes it\'s first request to the app it is asked to choose a \'profile
As an alternative to Evan's answer, which is definitively the correct AMD approach... have you considered using a global object for that purpose?
in main.js
window.myApp = {
prop1: 'value',
subOne: {
prop1: 'value'
}
...
}
That will allow you to access the global myApp
object everywhere. I know that some people will consider that as global namespace pollution and in general a bad practice, but in a SPA project (where you control window
) I'd consider this still a viable approach.