我在Angular JS中使用routeProvider。我的链接看起来像:
Uncaught Error: Syntax error, unrecognized expression: .nav-tabs a[href=#/profile/profession/3]
Angular JS告诉我页面中有错误:
$ bash -c ". ./host-install.sh && restore_mongodb ./social ~/Desktop/dump"
./host-install.sh: line 329: warning: setlocale: LC_ALL: cannot change locale (sv_SE.UTF-8): No such file or directory
*** 2015-05-07 09:51:53 dropping mongo storage social
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
*** 2015-05-07 09:51:53 unable to drop mongodb
(kthsocial)developer@developer-VirtualBox:/etc/social/social$
答案 0 :(得分:4)
你必须像这样给你的href表达式添加引号
.nav-tabs a[href="#/profile/profession/3"]
答案 1 :(得分:2)
.nav-tabs a[href="#/profile/profession/3"]
双引号应在href中使用。
答案 2 :(得分:2)
我评论你的风格需要改为
发件人强>
.nav-tabs a[href=#/profile/profession/3]
要强>
.nav-tabs a["href=#/profile/profession/3"]