Recently, I needed to add some custom styles to a checkbox in an Angular app. I found a simple example of what I wanted to do, implemented entirely with CSS and HTML, and containing no imperative code. Delighted with this discovery, I copied the CSS into my page and got it working with a few tweaks. Then I wondered what it would take to turn it into a custom component I could reuse. As it turns out, it was harder than I thought, but not overwhelming. The solution is described here. ...
7. Custom Angular Checkbox with [(ngModel)] Support
Get Angular for Business: Awaken the Advocate Within and Become the Angular Expert at Work now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.