Press "Enter" to skip to content

Sample Angular 8 Program To Use template.

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

    Leave a Reply

    Your email address will not be published. Required fields are marked *