I am trying to put together a view that should be reloaded (all data refreshed from the server) each time it is visited. Each time the page is loaded I intend for a datasource to be created and set on the page's view model. Now, what I have (an example is attached) works on the first view. Subsequent views always throw this exception:
Uncaught TypeError: Cannot call method 'closest' of undefined
from the kendo.mobile.min.js file.
I have tried the approach outlined here: http://www.kendoui.com/forums/kendo-ui-mobile/general-discussions/destroy-totally-remove-a-view-if-possible.aspx to completely destroy and remove the view from the DOM but I get the same error. So there must be some problem with the datasource. In the example I have attached the data source's data is from an array. My real intention is to use a datasource to fetch data from a remote endpoint (the URL of which will change each time the view is visited).
Please take a look at my example and tell me what is wrong or suggest an alternative way to get the behavior I'm looking for.
Thanks
Uncaught TypeError: Cannot call method 'closest' of undefined
from the kendo.mobile.min.js file.
I have tried the approach outlined here: http://www.kendoui.com/forums/kendo-ui-mobile/general-discussions/destroy-totally-remove-a-view-if-possible.aspx to completely destroy and remove the view from the DOM but I get the same error. So there must be some problem with the datasource. In the example I have attached the data source's data is from an array. My real intention is to use a datasource to fetch data from a remote endpoint (the URL of which will change each time the view is visited).
Please take a look at my example and tell me what is wrong or suggest an alternative way to get the behavior I'm looking for.
Thanks