Typescript/Aurelia: Unused fields

 In Aurelia there are 'view models' that contain fields that are used in 'views'. Fields from the view model can be accessed in the view.

E.g. 

demo-page.ts

export class DemoPage{

 field1: boolean = true;

 field2: boolean = true;

}

demo-page.html

<div if.bind="field1">Only show this div if field1 is true</div>

The inspector "Javascript -> General -> Unused global symbol" notices that field1 and field2 are not used within the demo-page.ts class, so I get 2 warnings.

I'd like IntelliJ to notice that I am actually using field1 in demo-page.html. I.e. I still would like the warning for field2 as it is not used anywhere.

Is there anyway of achieving this? I'm using the Aurelia plugin but it doesn't seem to do much.

2

Please sign in to leave a comment.