You must have come across this scenario where 15 or more lines of HTML needs to be repeated across the component but with different/same data.

It's really foolish to write those 15 or more lines of HTML every time it is required. Instead, we can use resources provided by Angular to optimize our HTML code to just 3 lines each time. Let’s see how we can do this.

Consider a table that has to be populated with different data at multiple places in the component.

Component: I have defined 2 lists which will be displayed in tabular format in the…

Ramya Balasubramanian

An Angular Developer who loves finding answers to all the mysteries of this universe

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store