AuthorDomenic Helfenstein

Angular Component – Part 2: ngModel

A

In my last article, I’ve explained how to use @Input() and @Output() and how to combine them to offer two-way binding for your component. This time I want to take this component to behave like a proper control within a <form>-element that is using ngForm. What’s ngModel, and why should I use it? In a typical Angular application, we often encounter scenarios where we have to handle forms with various input controls and a button to send data or perform some sort of action. The...

Angular Component – Part 1: one-way binding vs. two-way binding

A

In this short blog series, I want to show how to create an Angular component that can be used for user inputs. I know this is a topic for which many articles have been published. But while there are great tutorials that explain how it’s done, many of them lack the answer to the question of why. This is the reason I’m describing in this series how and why we are writing our components the way we do here at TimeRocket. This will be a 5-part series on the topic, so bear with me if the...

Recent Posts