My super class component has a variable say name
. (a protected variable)
I want to access it in a sub class html like {{name}}
.
But it gives following error on production build.
Property 'name' is protected and only accessible within class 'ABCSuperComponent' and its subclasses
When I make the name
variable public it works fine. But it's not a good OOP practice. So any solutions/advices or suggestions on my problem?