Webstorm 10 says "expected close"} "in Angularjs template code

I am using WebStorm 10.0.4 with some Angularjs files and it seems to work mostly. But WebStorm incorrectly puts the correct {{code}}. In particular, in this example:

<div>{{thisworks}}</div> <div>{{butnotthis | uppercase}}</div> <div>{{oreventhis()}}</div> 

The first line is fine, but WebStorm marks the second and third lines as invalid (red-red line). The error message it gives is "expected to close"} "for each line, as you can see:

error

In the Settings section β†’ Javascript-> I have

  • angularjs-DefinetlyTyped (from Download β†’ Typescript community stubs)
  • HTML
  • HTML5 / ECMASCRIPT 5
  • Meteor project library (this is a meteor project)
  • Node.js globals

Any ideas?

+7
angularjs webstorm
source share
2 answers

In Meteor projects, WebStorm treats .html files as default space patterns, so these Angular attachments are parsed. Disable "Open html files as descriptors" in the settings "File | Settings | Languages ​​and frames | JavaScript | Templates - does this help? Please note that Angular support in Meteor projects is planned for WebStorm 11 ( WEB-17118 )

+15
source share

Try WebStorm 11 EAP , it fully supports the Meteor-Angular package (you do not need to disable "Templates" -> Open html as a parameter for handlebars)

0
source share

All Articles