Conditionally make input field readonly in Angular 2 or 4: Advice + Best/which way to do it
问题 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 feedback on the numbered points 1..4: Task: Conditionally make input field readonly Relevant section of HTML: <input type="text" placeholder="Club Name" #clubName> Add this to Typescript component. // class properties @ViewChild('clubName') inp:HTMLInputElement; // Could also use interface Element // conditionally set in