I'm searching documentation about kendo Router with pushState=true.
Using the configuration like:
when I use router.navigate always is fired the routeMissing event. Why?
I think that there isn't enought documentation about how to work with pushState.
Should i use navigate with pushState:true or history.pushState?
Can some write some example ?
5 Answers, 1 is accepted
The documentation and example for the pushState property of the router can be found at the following link:
Also, please check the requirements when the root property is set and the pushState property is set to true:
The routeMissing event should be fired only when no route match is found:
Additionally, I can suggest checking the following article for the Kendo UI Router which contains examples:
I hope this information will help to achieve the desired result.
Telerik by Progress
I agree. The pushstate feature does not seem to work. Even if root option is correctly defined.
Navigation returns 404 pages.
Maybe need to configure htaccess with urlrewriting to allow * urls ?
The following Dojo snippet shows how pushState works with * urls. Click on its "Full screen" button in top right corner and the page will navigate through all defined urls. Navigating backwards is also possible. If this does not help, could you provide a Dojo snippet with the setup causing issues and add steps to reproduce with expected and actual results.
Thank you for this example.
But it seems that it only works when using navigate().
What happen if I want to access to a route without # directly from my browser ?
On my side, I get 404 pages. Should I configure urlrewriting in a htaccess file to allow all urls ?
Kendo Routers uses the fragment url part (#page). Navigating to the url without # results in a routerMissing event firing, which may be used for redirecting to root, as discussed in the following forum thread about the same case. Also configuring urlrewriting seems as an approach worth trying for handling such scenarios.