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

Change URL without routing

4 Answers 110 Views
SPA
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 13 Mar 2014, 06:21 PM
I have a need to change the URL without routing/changing the existing view.

Here is the use case:
User navigates to mysite.com/app#/items/add  to add a new item. User then hits save. I would like for the page to stay on that view in case the user wishes to make more edits but I want the URL and history to change to mysite.com/app#/items/<new-id>.

Right now when it changes the hash fragment, it swaps the view with the same view and there is a "add" in the history, neither of which is desirable. 

Is there any way to achieve my goal?

Thanks in advance for any help you may give me.

4 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 14 Mar 2014, 11:48 AM
Hello Michael,

This is somewhat hard to achieve, currently. The good news is that in our upcoming Q1 release, due end of this month, we are going to expose another navigational method, replace, which is going to replace the current URL state with the next one, not keeping the previous entry in the history.

If I understand your case correctly, you will still have to do some custom coding to ensure that the view is not swapped with itself, though.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Michael
Top achievements
Rank 1
answered on 14 Mar 2014, 12:00 PM
This is good news as I already have code in place to not swap the view so this looks like exactly what I am looking for. Do you have an ETA on the release? Is it already in a nightly build that I might try?

Thanks!
0
Petyo
Telerik team
answered on 14 Mar 2014, 01:13 PM
Hi Michael,

Thank you for your interest. We don't have this in any public release available - I literally implemented it today and it has not passed any QA yet. Our Q1 release is usually happens March 22-24, so it's not too far away, though. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Michael
Top achievements
Rank 1
answered on 14 Mar 2014, 01:24 PM
Awesome! Thanks so much for the info.
Tags
SPA
Asked by
Michael
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Michael
Top achievements
Rank 1
Share this question
or