The angular, we can control tag element with help of if condition. In this example, we will control div element through if condition and toggle.
- We will display the div element content on a page only when if the condition showMore variable is true.
- We can display the div element content through toggle button
Add the following line of app.component.ts