Ember.js, handlebars, syntax checking
Good Evening All,
I have been using WebStorm for a site I am working on. So far, it is a great tool!
But I am having an issue with the syntax checking when using handlebars in my html. My HTML looks like this:
<script data-template-name="tree-node" type="text/x-handlebars">
<span {{bindAttr }} {{action toggle}} >
{{#if isExpanded}}
▼
{{else}}
▶
{{/if}}
</span>
<a {{action click}} >{{text}}</a>
{{#if isExpanded}}
{{control "treeBranch" content}}
{{/if}}
</script>
The handlebars stuff makes the editor show errors inside the tags where it is used. It isn't stopping me from using the tool and I understand the handlebars stuff isn't standard HTML, but I was wondering if there is a way to get it to either ignore everything in the {{}} blocks or to actually parse it and only generate errors where there are actual errors.
Thanks,
Howard
请先登录再写评论。
Nobody at all has at least a suggestion for this question? I looked on Google and I'm using the latest PHPStorm 7 EAP and Ember.js/Handlebars syntax still doesn't work well.
Sorry if I'm not providing an answer, I've found that thread while looking for an answer myself.
I wish I could have syntax highlighting within handlebars' script tag (for ember.js):
For example:
<script type="text/x-handlebars" data-template-name="wineries">
{{#each}}
<p>{{name}}</p>
{{/each}}
</script>
Works fine for me using the latest PHPStorm 7 build - content of script tag is treated as HTML, no errors shown
Please make sure to install 'EJS' and 'Handlebars/Mustache' plugins from the repository (Settings/Plugins, Browse repositories...)
Full support will be available when http://youtrack.jetbrains.com/issue/IDEA-106449 is fixedhttp://youtrack.jetbrains.com/issue/IDEA-106449
Ups... sorry - works fine in WebStorm7, but not in PHPStorm 7
:(Thanks for your response!

I had handlebars/mustache installed but not EJS, I installed it, restarted and still see this:
Any ideas? Thanks
Seems that 'EJS' and 'Handlebars/Mustache' plugins available in the repository are outdated, and WebStorm bundles newer versions...