Using a Route with a Query String page.aspx?/item/id

4 posts, 1 answers
  1. Robert Kaucher
    Robert Kaucher avatar
    56 posts
    Member since:
    Oct 2010

    Posted 21 May 2013 Link to this post

    Is there any way to use the router along with a route defined in the query string as in the subject?

    I am building a SPA within SharePoint 2010 and I MUST access the page using a URL like  domain.com/site/_Layouts/page.aspx  

    I have tried using domain.com/site/_Layouts/folder/ by renaming the page default.aspx but that seems to kill the SP Client Side Object Model.

    Is it still possible to use the router? And how?
  2. Answer
    Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 22 May 2013 Link to this post

    Hello,

    Currently, the client side routing can use only the fragment part of the url (changing the query string part would cause page reload). For our next release, we consider enabling the pushState support, which would allow you to use the Query string part (as well as the path) for routing. 

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Robert Kaucher
    Robert Kaucher avatar
    56 posts
    Member since:
    Oct 2010

    Posted 08 Jun 2013 Link to this post

    I'm ashamed to admit that I must have been doing something wrong as I got this working. THanks for the information, though!
  5. Phil H.
    Phil H. avatar
    88 posts
    Member since:
    Nov 2008

    Posted 01 Aug 2015 Link to this post

    Hi All:

    This is what I came up with.

    <script>
        var router = new kendo.Router({ pushState: true, root: "/L/Router02.aspx?" });
        $(function () {
            router.start();
            router.route("/:id/:detailId", function (id, detailId, params) {
                console.log(router.root, " item id: ", id, " detail: ", detailId);
            });
            router.start();
        });
    </script>

    Phil

Back to Top
Kendo UI is VS 2017 Ready