I'm having some troubles with this rule (templates-use-public) and WebStorm. You can see it here:
What's the main purpose for this rule? What's wrong?
This rule is about accessing component's private members from the template. Private members are intended to be used in a class itself only; templates are executed outside of the component scope, so they shouldn't have access to privates. Please see https://groups.google.com/forum/#!msg/angular/D_O_1fqA9WQ/pRNQARRiBgAJ, https://github.com/devoto13/angular2-private-members-example.
As for highlighting, seems that incorrect errors positions are reported by codelizer. Please run tslint in terminal using ng lint
- what is the result?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With