DurandalアプリにmessageBoxがあり、[いいえ]または[はい]をクリックすると、他のページにスローされます。ルーターでこれを実行したいのですが、ページが切り替えられません。
コードがその行を実行しているのがわかりますが、何も起こりません!
define(function(require) {
var app = require('durandal/app'),
system = require('durandal/system'),
router = require('durandal/plugins/router');
return {
router: router,
displayName: 'SometingApp Startpage',
activate: function() {
system.log("Application started!");
},
createEstimate: function() {
app.showMessage('Do you want to create a new something?', 'New something', ['Yes', 'No']).then(function(result) {
if (result == "Yes") {
return router.activate('otherpage');
}
});
}
};
});
ユーザーは、createEstimateにバインドされているボタンをクリックします。
誰かが助けてくれることを願っています!