AngularJS (1.5) component with TypeScript decorators

Hello,

I'm currently working on a project with Angular 1.5 and TypeScript.

I have some decorators (component for example) defined in TypeScript, and use them like :

@Component(...) with parameters needed to define a angular component.

The Component decorator is mostly doing a call to angular.module(...).component(...) to register the component.

By using those decorators, it seems Webstorm can't provide code completion in HTML. The tags are unknown, and same for attributes.

Is there a way to tell Webstorm about these components, in order to have code completion ?

 

In a general way, the angularjs plugin seems to not provide code completion if the angular.module(...).component(...) is not called "inline". If you even use a variable (const in TypeScript) to store the component configuration, then you won't have code completion, neither for tag nor attributes.

 

I'm currently at work and can't provide a simple project, but will do in the near future if you need.

 

Thank you in advance for your help.

0
1 comment

Similar issues are tracked as
https://youtrack.jetbrains.com/issue/WEB-23294 and https://youtrack.jetbrains.com/issue/WEB-21790;

in general, AngularJS integration doesn't correctly work when using TypeScript - support is not yet available: https://youtrack.jetbrains.com/issue/WEB-10720

1

Please sign in to leave a comment.