Need examples about Kendo Router with pushState=true

2 posts, 0 answers
  1. phx255
    phx255 avatar
    10 posts
    Member since:
    Feb 2016

    Posted 29 Nov 2016 Link to this post

    I'm searching documentation about kendo Router with pushState=true. 
    Using the configuration like:

    pushState:true

    root:"/"

    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 ?

    Thanks

    var router = new kendo.Router({
        pushState: true,
        root: "/",
        init: function(e) {
            debugger
        },
        routeMissing: function(e) {
            debugger
        },
        change: function(e) {
            debugger
     
        }
    });
     
    router.route("/", function() {
        loadModule("/presentacion");
    });
     
     
    router.route("/previsiones", function() {
        loadModule("/controls/prv/prv_listadoPrevisiones");
    });
  2. Stefan
    Admin
    Stefan avatar
    912 posts

    Posted 01 Dec 2016 Link to this post

    Hello Jaime,

    The documentation and example for the pushState property of the router can be found at the following link:

    http://docs.telerik.com/kendo-ui/api/javascript/router#configuration-pushState

    Also, please check the requirements when the root property is set and the pushState property is set to true:

    http://docs.telerik.com/kendo-ui/api/javascript/router#configuration-root

    The routeMissing event should be fired only when no route match is found:

    http://docs.telerik.com/kendo-ui/api/javascript/router#events-routeMissing

    http://docs.telerik.com/kendo-ui/framework/spa/router#missing-routes

    Additionally, I can suggest checking the following article for the Kendo UI Router which contains examples:

    http://developer.telerik.com/featured/unleashing-power-kendo-uis-router/

    I hope this information will help to achieve the desired result.

    Regards,
    Stefan
    Telerik by Progress
    Kendo UI is ready for Visual Studio 2017 RC! Learn more.
Back to Top