app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
showParagraph:boolean = true;
}
app.component.html
<h2>Angular If Then Condition</h2>
<div *ngIf="showParagraph then lorem_ipsum"></div>
<ng-template #lorem_ipsum>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec tincidunt est quam, nec hendrerit nisl laoreet laoreet.
</ng-template>
- angular - How to use if statement
- angular - Multiple condition
- angular - How to use switch case default
- angular - How to use for loop
- angular material - Button toggle group icon only
- angular material - How to show Tooltip
- angular material - How to set Tooltip show hide delay
- angular material - Progress bar with percentage
- angular - How to change default font
- angular material - How to change Progress bar height
- angular material - How to change vertical Divider height
- angular material - How to use determinate Progress spinner
- angular material - How to use Card
- angular material - How to use Tabs selectedTabChange event
- angular material - How to show remove button on Tab label