您好我正在使用示例应用程序与导航列表,但我想创建一个登录页面在其上一次我点击登录按钮,认证后我必须将应用程序路由到主页面。 我尝试了下面的代码,但没有发生任何事情。 oj.Router.rootInstance.go('login');Oracle JET:想要创建一个登录页面,其中点击登录按钮应该路由我到主页
请大家帮忙。
应用:甲骨文JET分布
代码:
功能(OJ,KO,APP){//当所有需要的模块被加载
$(function() {
function init() {
oj.Router.sync().then(
function() {
// Bind your ViewModel for the content of the whole page body.
ko.applyBindings(app, document.getElementById('globalBody'));
// navigate the user to login or wherever you want them to be now
oj.Router.rootInstance.go('login');
},
function (error) {
oj.Logger.error('Error in root start: ' + error.message);
}
);
}
由于JET是JS工具你就更有可能得到在Oracle TechNet论坛答案的Oracle专用包致力于JET。 [在此查找](https://community.oracle.com/community/development_tools/oracle-jet) – APC
请阅读[我如何问一个好问题?](http://stackoverflow.com/help/how-询问),然后尝试提出更多问题。 –
请阅读[为什么“有人可以帮助我?”不是一个实际的问题?](https://meta.stackoverflow.com/questions/284236/why-is-can-someone-help-me-not-an-实际问题),然后再试图提出更多问题。 –