Angular?因为少而抛出意外的令牌?
Angular? throwing unexpected token because of less?
我正在使用:
JSPM, SystemJS and Angular
我无法导入less文件没有运行出现一系列错误:
Error: [$parse:syntax] Syntax Error: Token 'text' is an unexpected token at column 8 of the expression [status text] starting at [text].
http://errors.angularjs.org/1.5.0/$parse/syntax?p0=text&p1=is%20an%20unexpected%20token&p2=8&p3=status%20text&p4=text
at eval (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:68:12)
at Object.AST.throwError (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:13816:11)
at Object.AST.ast (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:13586:12)
at Object.ASTCompiler.compile (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:14040:31)
at Parser.parse (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:14927:29)
at $parse (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:15035:39)
at $interpolate (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:11770:25)
at addTextInterpolateDirective (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:9282:27)
at collectDirectives (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:8350:11)
at compileNodes (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:8145:22) undefined
我在网上看了很多书,发现对于某些人来说,这是文件的编码,但我尝试了几种方法,包括下面的一种,但没有成功:
@charset "utf-8";
/* CSS Document */
知道为什么会这样吗?
如果我的代码中有任何部分可以提供帮助,请告诉我。
编辑:
谢谢!
问题是评论!!我不知道为什么,但 Angular 试图解析评论:
/*
---------------------------------------
A status badge.
---------------------------------------
Usage:
<span class="badge badge-status">
{{status text}}
</div>
---------------------------------------
*/
我删除评论解决了。
我正在使用:
JSPM, SystemJS and Angular
我无法导入less文件没有运行出现一系列错误:
Error: [$parse:syntax] Syntax Error: Token 'text' is an unexpected token at column 8 of the expression [status text] starting at [text].
http://errors.angularjs.org/1.5.0/$parse/syntax?p0=text&p1=is%20an%20unexpected%20token&p2=8&p3=status%20text&p4=text
at eval (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:68:12)
at Object.AST.throwError (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:13816:11)
at Object.AST.ast (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:13586:12)
at Object.ASTCompiler.compile (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:14040:31)
at Parser.parse (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:14927:29)
at $parse (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:15035:39)
at $interpolate (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:11770:25)
at addTextInterpolateDirective (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:9282:27)
at collectDirectives (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:8350:11)
at compileNodes (http://localhost:8002/jspm_packages/npm/angular@1.5.0/angular.js:8145:22) undefined
我在网上看了很多书,发现对于某些人来说,这是文件的编码,但我尝试了几种方法,包括下面的一种,但没有成功:
@charset "utf-8";
/* CSS Document */
知道为什么会这样吗? 如果我的代码中有任何部分可以提供帮助,请告诉我。
编辑:
谢谢!
问题是评论!!我不知道为什么,但 Angular 试图解析评论:
/*
---------------------------------------
A status badge.
---------------------------------------
Usage:
<span class="badge badge-status">
{{status text}}
</div>
---------------------------------------
*/
我删除评论解决了。