This is a migrated thread and some comments may be shown as answers.

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

3 Answers 52 Views
SPA
This is a migrated thread and some comments may be shown as answers.
Robert Kaucher
Top achievements
Rank 2
Robert Kaucher asked on 21 May 2013, 08:17 PM
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?

3 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 22 May 2013, 07:22 AM
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!
0
Robert Kaucher
Top achievements
Rank 2
answered on 09 Jun 2013, 01:06 AM
I'm ashamed to admit that I must have been doing something wrong as I got this working. THanks for the information, though!
0
Phil H.
Top achievements
Rank 2
answered on 01 Aug 2015, 06:31 PM

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

Tags
SPA
Asked by
Robert Kaucher
Top achievements
Rank 2
Answers by
Petyo
Telerik team
Robert Kaucher
Top achievements
Rank 2
Phil H.
Top achievements
Rank 2
Share this question
or