Why is Angulars JS giving error in URL routeProvider?

I am using routeProvider in Angular JS. My links look like this:

www.site.com/profile#/profile/profession/3

      

Angular JS reports that there was an error on the page:

Uncaught Error: Syntax error, unrecognized expression: .nav-tabs a[href=#/profile/profession/3]

      

+3


source to share


3 answers


you need to add a quote for the href expression like this



.nav-tabs a[href="#/profile/profession/3"]

      

+4


source


.nav-tabs a[href="#/profile/profession/3"]

      



Double quotes must be used in href.

+2


source


As I said, your style needs to be changed to

FROM

.nav-tabs a[href=#/profile/profession/3]

For

.nav-tabs a["href=#/profile/profession/3"]

+2


source







All Articles