Hi i'm new to building web pages applications, i started with HotTowel videos from John Papa and used initially the HotTowel VSIX Template.
When i decided to update to Durandal 2.0 i faced the issue that the application would not proceed from the activate method in the shell module.
After some Google search's i found out that the problem has to due with durandal using jquery promises, i have tried the fix announced in http://durandaljs.com/documentation/Q/ but its not working, can someone provide me with some light on the issue.
PS: im new to js and web in general so i'm sorry if the question isn't clear enough
in my shell.js i have:
function activate() {
app.title = config.appTitle;
return datacontext.primeData()
.then(boot)
.fail(failedInitialization);
}
function boot() {
logger.log('CodeCamper Backend Loaded!', null, system.getModuleId(shell), true);
router.map(config.routes).buildNavigationModel();
return router.activate();
}
function addSession(item) {
router.navigateTo(item.hash);
}
function failedInitialization(error) {
var msg = 'App initialization failed: ' + error.message;
logger.logError(msg, error, system.getModuleId(shell), true);
}
and in my datacontext:
var primeData = function () {
var promise = Q.all([
getLookups(),
getSpeakerPartials(null, true)])
.then(applyValidators)
return promise
.then(success);
function success() {
datacontext.lookups = {
rooms: getLocal('Rooms', 'name', true),
tracks: getLocal('Tracks', 'name', true),
timeslots: getLocal('TimeSlots', 'start', true),
speakers: getLocal('Persons', orderBy.speaker, true)
};
log('Primed data', datacontext.lookups);
}
function applyValidators() {
model.applySessionValidators(manager.metadataStore);
}
};