Send datas to another page with app.navigate

5 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    3 posts
    Member since:
    Mar 2013

    Posted 27 Mar 2014 Link to this post

    Hello everyone!

    I'm new with Phonegap and Kendo!
    I look for a solution for several hours and nerver found it, so I need your  precious help!

    I  have a listview-link and when I click on an item, I call a function who use "app.navigate" to redirect to an another page, but I want to know if is it possible to send datas to this another page? and how to do that?

    Maybe I should use an another solution than app.navigate? 

    thank you in advance.





  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 28 Mar 2014 Link to this post

    Hello Nicolas,

    You can pass parameters to the view that is being loaded with the application.navigate() method. The parameters will be available in the event argument of the view you are navigating to. This is explained in the following documentation article:

    http://docs.telerik.com/kendo-ui/getting-started/mobile/view#view-parameters

    For your convenience I have also create an example, showing a possible implementation:

    http://jsbin.com/sixezacu/1/edit

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Nicolas
    Nicolas avatar
    3 posts
    Member since:
    Mar 2013

    Posted 28 Mar 2014 in reply to Kiril Nikolov Link to this post

    Hi!

    thanks, this exemple helps me a lot!

    I finally used simple href for navigate with my differents views. But I have the same problem with parameters :

    When I test this code, console return this error :  Uncaught TypeError: Cannot read property 'idDispo' of undefined

    any idea?

    <ul data-role="listview"   data-style="inset" id="dispos">
    <li>
    <a href="#tabstrip-showDispo?idDispo=1" class="km-listview-link" data-role="listview-link">test</a>
    </li>
    </ul>
     
     
     <div id="tabstrip-showDispo"
            data-role="view"
            data-title="Disponibilités"
            data-show="showDispo">
     
    </div>

    and my JS function :

    function showDispo(e){
     
         var idDispo=e.params.idDispo;
         console.log(idDispo);
                              
    }


  5. Nicolas
    Nicolas avatar
    3 posts
    Member since:
    Mar 2013

    Posted 28 Mar 2014 in reply to Nicolas Link to this post

    I finally found my error, just a simple syntax error :)
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 28 Mar 2014 Link to this post

    Hello Nicolas,

    I am glad that I helped you resolving this issue.

    In case you have any further questions, please do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready