Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove '#' before hash url #175

Open
honeypc opened this issue May 28, 2013 · 4 comments
Open

How to remove '#' before hash url #175

honeypc opened this issue May 28, 2013 · 4 comments

Comments

@honeypc
Copy link

honeypc commented May 28, 2013

ex: http://localhost:15840/product/list#/?page=2
I want my url display same: http://localhost:15840/product/list/?page=2
Thanks

@lupetalo
Copy link

+1 to this

@trusktr
Copy link

trusktr commented Aug 2, 2013

Go look at the History API (e.g. history.pushState). You'll have to do it on your own. jquery-address (AFAIK) is meant to be used with a hash only (#).

@jagc
Copy link

jagc commented Aug 22, 2013

This should answer your question:

$('a').address(function()
{
return $(this).attr('href').replace(/^#/, '');
});

@RTakes
Copy link

RTakes commented Jan 7, 2014

I had the same issue and solved it by using the $.address.state(value). For example $.address.state('product/list').

From the documentation
$.address.state(value) Returns: jQuery Address
Sets the base path of the website that is utilized in HTML5 state management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants