I was attempting to answer someone elses question. And in doing so realised there was quite a bit of uncertainty in my mind about a few things. I\'m hoping someone can provide f
All depends on what you want to achieve. At first look, I would say that pct. 2 is the simplest way to do it:
Then, on your component you declare the variable:
isReadOnly: boolean;
After, you assign the value as you wish:
// when you want to be read-only
isReadOnly = true;
// whe you want to be editable
isReadOnly = false;