sammy icon indicating copy to clipboard operation
sammy copied to clipboard

Is SammyJs capable of routing without hash in the URL

Open iberodev opened this issue 7 years ago • 1 comments

I see there is a branch called non-hash and when using the Github comparer it seems that all contents from non-hash branch are in master branch.

I am using sammyJs and I'd like to have the routing without the hash character to make it SEO-friendly. Unfortunately I cannot find any documentation on whether sammyJs is capable of doing so or how to do it.

Any help would be much appreciated.

Thanks in advance.

iberodev avatar May 31 '17 09:05 iberodev

Sammy is build from jquery, so you can do all with jquery. this.get(''); will return to index or page that you set before. or inside this.get('') give your function like this : this.get('',function(context){ yourfunction(context.$element()); }); function yourfunction(el){ el.html('your html or php'); //or window.location.href = 'index.html'; }

Maybe i can help you

El-Mahbub avatar Oct 12 '17 23:10 El-Mahbub