javascript - How to use two hashPrefix in and AngularJS application? -


I am trying to do SPO-friendly SPA and currently it has links to # / path / page and I #! / Path / page, sadly that the site is currently in production and it has already been shared on social, so I keep the old link (# / path / page) available I am trying.

Is there a way to redirect this traffic or to work both the hash prefix in any workaround, #and #!? I found an easy solution, fingerprints should not include JavaScript only:

 < Code> & lt; Script & gt; If (window.location.hash.indexOf ("# /")! = -1 and window.location.hash.indexOf ("#! /") == -1) {window.location.hash = window. location.hash.replace ("#", "#!"); } & Lt; / Script & gt;    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -