jquery-address icon indicating copy to clipboard operation
jquery-address copied to clipboard

How to remove '#' before hash url

Open honeypc opened this issue 12 years ago • 4 comments

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

honeypc avatar May 28 '13 04:05 honeypc

+1 to this

lupetalo avatar Jul 31 '13 11:07 lupetalo

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 (#).

trusktr avatar Aug 02 '13 23:08 trusktr

This should answer your question:

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

jagc avatar Aug 22 '13 01:08 jagc

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.

RTakes avatar Jan 07 '14 17:01 RTakes