How to understand this line of HTML?

2 days ago 4
ARTICLE AD BOX

Why are there square brackets around [ngClass] and [attr.data-testid]?

What does the value of [ngClass] indicate? For example, what is the || operator doing in there, and the empty string ''?

Where might our framework, Angular, be getting dashboard.value from? Does it come from the TypeScript sibling file to this HTML file?

<h1 class="text-center status-count" [attr.data-testid]="dashboard.testId" [ngClass]="dashboard.cssClass || ''">{{ dashboard.value }}</h1>
Read Entire Article