App.navigate function does not exist

3 posts, 1 answers
  1. Nikolaus
    Nikolaus avatar
    6 posts
    Member since:
    Mar 2017

    Posted 20 Apr 2017 Link to this post



    I'm trying to navigate within my app, but it seems that the app variable isn't defined in the usual way. I didn't create any of the framework myself (the app is based on the default template), but when I try to use app.navigate, I get an error that that function does not exist. When I checked my app.js, it seems like a custom app is being defined, instead of using app = new How do I navigate in my app while keeping my layout page? The nav links on the layout page just use anchor tags (href=view/example.html) but if I try that anywhere else, it obviously opens the page without the layout.

  2. Nikolaus
    Nikolaus avatar
    6 posts
    Member since:
    Mar 2017

    Posted 20 Apr 2017 in reply to Nikolaus Link to this post

    For some reason I had to use:


  3. Answer
    Martin avatar
    104 posts

    Posted 24 Apr 2017 Link to this post

    Hi Nikolaus,

    I assume your are using the Views service of Telerik Platform. There the mobile app indeed is created not in "app" variable but in "app.mobileApp":

    app.mobileApp = new, {
        skin: 'nova',
        initial: 'components/home/view.html'
    // navigate to a remote view

    Therefore you have to use app.mobileApp for all subsequent methods, like navigation. This is the main difference with the documentation on navigation where navigation is the following:

    var app = new;
    // navigate to a remote view

    I hope this has helped.

    Telerik by Progress

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top