yuя*_*uяi 5 ember.js ember-cli
其他人在浏览器控制台中收到此警告?页面首次加载时始终位于第一行.
Uncaught SyntaxError: Unexpected token < ember-cli-live-reload.js:1
Run Code Online (Sandbox Code Playgroud)
我的堆栈:
DEBUG: -------------------------------
ember.js:3935 DEBUG: Ember : 1.9.1
ember.js:3935 DEBUG: Ember Data : 1.0.0-beta.14.1
ember.js:3935 DEBUG: Handlebars : 2.0.0
ember.js:3935 DEBUG: jQuery : 1.11.2
ember.js:3935 DEBUG: Ember Simple Auth : 0.7.2
ember.js:3935 DEBUG: Ember Simple Auth Testing : 0.7.2
ember.js:3935 DEBUG: -------------------------------
Run Code Online (Sandbox Code Playgroud)
这通常是由于模板中某处的 html 对车把的注释不当造成的。
我有:
<!-- <hr>
{{#link-to 'job-applications.job-application' profile class="btn btn-default btn-block btn-outline" tagName='button'}}View Full Application{{/link-to}} -->
Run Code Online (Sandbox Code Playgroud)
这是导致问题的原因。应该删除所有未使用的句柄,或者至少不要在注释中混合使用 html 和句柄。