This question is locked. New answers and comments are not allowed.
This is actually relating to this functionality to navigate around the app from JavaScript:
I've been using is in various places in the app until I realised that I was in fact creating multiple instances of the application, which was not my intention and I guess could lead to problems and slowness.
After googling, I came across this web site that says to use the original instance used to initialise the app, but I can't seem to make it work? The following code is somewhat redundant as I know you can set the home view on initialisation of the app, but I wanted to see how it worked and the answer is that it doesn't at least not for me...
The error seen in the console log is "Cannot call method 'navigate' of undefined on App". Can anyone assist?
Stewart
var app = new kendo.mobile.Application();
app.navigate("#tabstrip-home");
I've been using is in various places in the app until I realised that I was in fact creating multiple instances of the application, which was not my intention and I guess could lead to problems and slowness.
After googling, I came across this web site that says to use the original instance used to initialise the app, but I can't seem to make it work? The following code is somewhat redundant as I know you can set the home view on initialisation of the app, but I wanted to see how it worked and the answer is that it doesn't at least not for me...
(function (global) {
var mobileSkin = "",
app = global.app = global.app || {},
os = kendo.support.mobileOS,
statusBarStyle = os.ios && os.flatVersion >= 700 ? "black-translucent" : "black";
document.addEventListener('deviceready', function () {
navigator.splashscreen.hide();
}, false);
var app = new kendo.mobile.Application(document.body, {
layout: "tabstrip-layout",
statusBarStyle: statusBarStyle,
//useNativeScrolling: true
});
app.navigate('#tabstrip-workshops');
})(window);
The error seen in the console log is "Cannot call method 'navigate' of undefined on App". Can anyone assist?
Stewart