2016-03-08 28 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> 

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

我解決了它通過刪除評論。