Problem Statement
What are templates in Angular and how can you define them?
Explanation
Templates are enhanced HTML that bind to component data and use directives. Define inline with `template: '...'` for small views, or in a separate file with `templateUrl` for larger ones. Templates can use interpolation, property/event binding, pipes, and structural directives.
Code Solution
SolutionRead Only
@Component({ selector: 'app-greet', template: `<h1>Hello {{name}}</h1>` })
export class Greet { name = 'Angular'; }