2016-03-08 27 views
0

我使用:角?抛出意外的标记,因为更少?

JSPM,SystemJS和角度

我无法导入减档,而不会在一系列错误:

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/[email protected]/angular.js:68:12) 
    at Object.AST.throwError (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:13816:11) 
    at Object.AST.ast (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:13586:12) 
    at Object.ASTCompiler.compile (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:14040:31) 
    at Parser.parse (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:14927:29) 
    at $parse (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:15035:39) 
    at $interpolate (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:11770:25) 
    at addTextInterpolateDirective (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:9282:27) 
    at collectDirectives (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:8350:11) 
    at compileNodes (http://localhost:8002/jspm_packages/npm/[email protected]/angular.js:8145:22) undefined 

enter image description here

我在网上读了很多,发现对于一些人来说,这是文件的编码,但我已经尝试了几次包括下面的一个没有运气:

@charset "utf-8"; 
/* CSS Document */ 

任何想法为什么会这样呢? 请让我知道,如果有我的代码的任何部分,可以帮助。

编辑:

enter image description here

enter image description here

谢谢!

+0

是什么让你觉得这个消息与less或css有关?看起来你的HTML模板中有一个不正确的表达式。 'status text'在您的源码中出现在哪里? –

+0

@JBNizet当我调试我可以看到较少的文件抛出错误。检查新图像。 – eestein

+0

@JBNizet我刚刚添加了两张照片,以便更好地理解这个问题。 – eestein

回答

0

问题是一个评论!我不知道为什么,但Angular试图解析评论:

/* 
--------------------------------------- 
A status badge. 
--------------------------------------- 

Usage: 

    <span class="badge badge-status"> 
    {{status text}} 
    </div> 

--------------------------------------- 
*/ 

我解决了它通过删除评论。