© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
M. D. CallaghanAngular for Business https://doi.org/10.1007/978-1-4842-9609-7_7

7. Custom Angular Checkbox with [(ngModel)] Support

Michael D. Callaghan1  
(1)
Celebration, FL, USA
 

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. ...

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.