2012-06-12 74 views
0

加载angularjs时出现奇怪的错误。我试图在网上搜索,但没有发现。你知道这是什么意思吗?加载Angularjs时出现错误

Error: Syntax Error: Token ',' is an unexpected token at column 5 of the expression ['ar', 'Arabic'), 
... 
('zh-tw', 'Traditional Chinese']. 
at Error (unknown source) 
at throwError (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:5845:11) 
at parser (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:5839:5) 
at http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:6402:29 
at http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:4822:27 
at addTextInterpolateDirective (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:4406:27) 
at collectDirectives (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:3908:11) 
at compileNodes (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:3798:21) 
at compileNodes (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:3806:14) 
at compileNodes (http://127.0.0.1:8001/static/js/libs/angularjs/angular-1.0.0rc11.js:3806:14) angular-1.0.0rc11.js:5541 
$get 
+0

您是否在下载之后修改JS文件?由于语法不正确,你得到的是解析器错误。 – xbonez

回答

1

经过数小时的反复试验,终于找到了这里发生的事情。认为它值得与你们分享,以便在面临同样问题时不会浪费时间。

问题是,在配置interpolateProvider时,我使用了错误的开始((()和结束()))符号。将开始和结束符号更改为另一个符号后,错误消失。