2

Providing parameter to navigate back function in a Kendo View

According to the Kendo UI documentation, you can easily navigate backwards to the previously visited mobile View using the following function:

app.navigate("#:back");

With default navigation it's quite easy to provide parameters, like app.navigate("#my-view?id=xxx&foo=bar"). However, is it possible to provide a parameter to the back function? Meaning something like this (fictional) example:

app.navigate("#:back?pageIndex=5");

If not, are there any other smart suggestions to look into? Obviously, my pseudo sample doesn't work.

The reason is that all my views are seperated in loose files and the page that calls the back function works somewhat like a dialog: sometimes it should provide arguments back to the previous view. And sometimes not. In the fictional example, I want to basically intercept certain functions in the 'parent view' if certain parameters are provided.

Despite the fact that using a ModalView would normally be a better fit here, or even a decent global datasource, I'm curious about this one.

Juliën
  • 9,047
  • 7
  • 49
  • 80
  • I ran into this issue too. I use angular with my kendo app so I ended up "solving" the problem by following their 'appService' pattern. In that pattern you pass a service to all our angular controllers that controls app level functionality. I then added a property on that appService to control the parameters being passed 'back' to a view. If you aren't using angular, I'm afraid the only option is to use some sort of global variable. Good luck! – Mike Becatti Apr 20 '15 at 19:38

0 Answers0