Search code examples
javascriptangularjsurl-routingsingle-page-applicationangularjs-routing

Why Angulars JS gives error in URL routeProvider?


I use routeProvider in Angular JS. My links look as:

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

Angular JS tells that was error in page:

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

Solution

  • you have to add quote to you href expression like this

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