角?因为少投掷意外的令牌?

时间:2016-03-08 14:37:05

标签: angularjs less systemjs jspm

我正在使用:

  

JSPM,SystemJS和Angular

如果没有遇到一系列错误,我无法导入更少的文件:

{{input focus-in=(action "toggleSomething" true) focus-out=(action "toggleSomething" false)}}

enter image description here

我在线阅读了很多内容,发现对于某些人来说,这是文件的编码,但我尝试了几件事情,包括下面的一件事,没有运气:

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

任何想法为什么会发生这种情况? 如果我的代码中有任何部分可以提供帮助,请告诉我。

编辑:

enter image description here

enter image description here

谢谢!

1 个答案:

答案 0 :(得分:0)

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

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

Usage:

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

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

我通过删除评论解决了这个问题。