DEV Community

kohenSteve
kohenSteve

Posted on

Does Angular support generic component types?

typed generics
Typescript Generics is an absolutely powerful resource. Through generics, we can modify an existing interface for a specific use case. For example, you could have a grid to display rows of information. By making the network component conventional, customers can provide their own interface that represents their line facts and present that interface used throughout the network component homes. camzap bazoocam

Why will we need a generic component?
Before we dive into the technicalities of the prevailing ingredients, I suppose it's essential to understand why we need to have standard support for our additives.

Let's say we have a grid problem that displays widgets and fires an event while customers select a row. Without Generics, we need to specify the row info type as any because we need to reuse this grid factor with different statistical units.

Top comments (0)