This is a migrated thread and some comments may be shown as answers.

Send datas to another page with app.navigate

4 Answers 415 Views
Application
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 27 Mar 2014, 03:53 PM
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.





4 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 28 Mar 2014, 12:20 PM
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!
 
0
Nicolas
Top achievements
Rank 1
answered on 28 Mar 2014, 01:14 PM
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);
                          
}


0
Nicolas
Top achievements
Rank 1
answered on 28 Mar 2014, 01:31 PM
I finally found my error, just a simple syntax error :)
0
Kiril Nikolov
Telerik team
answered on 28 Mar 2014, 01:36 PM
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!
 
Tags
Application
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Nicolas
Top achievements
Rank 1
Share this question
or