what is template?.
template option of component will take an inline template for an Angular component. once a template option is provided for a component , then no need to specify templateUrl.
app.component.ts:-
import { Component } from ‘@angular/core’;
@Component({
selector: ‘app-root’,
template: “Hello Welcome To {{title}}”
})
export class AppComponent {
title = ‘Whatsmysuggestion’;
}
Be First to Comment