Reputation: 3134
I am working on an Angular 2 application and use IntelliJ IDEA for development. I like the feature of showing unused variables. However, if a function is used in component HTML, the component typescript files still say the function is unused. Is there any configuration to avoid this? It is very frustrating as I don't like to see unused variables or functions and if I accidentally delete them, they are not detectable until run time since this is JS.
Update 2017-06-05T14:04:00Z:
IDE Version: IntelliJ IDEA 2017.1.4 Build #IU-171.4694.23, built on June 6, 2017 Mac OS X 10.12.3
Public function in Angular component
backToEdit(): void {
this.finished = false;
}
Usage in Angular component HTML
<button type="button" (click)="backToEdit()" class="btn btn-default stepy-finish">
<i class="position-left icon-arrow-left13"></i>Back to Edit
</button>
Upvotes: 1
Views: 1017