这基本上就是我想做的事情:
myapp.StartScreen.created = function (screen) {
screen.getIsAdmin().then(function success() {
this.navigate("AdminHome.lsml");
}, function error() {
this.navigate("UserHome.lsml");
});
};
但使用“this.navigate”或“this.location”导航似乎不起作用。有什么建议吗?
答案 0 :(得分:0)
看起来以下内容对我有用:
myapp.StartScreen.created = function (screen) {
screen.getIsAdmin().then(function success() {
this.window.location.href = '#/AdminHome/undefined/[dee7135da]';
}, function error() {
this.window.location.href = '#/ClientHome/undefined/[c4fb70ef3]';
});
};