0
0
llucycodes42
The import statement imports the Component and OnInit constructor functions from the @angular/core module. The @Component annotation defines the selector name for this component. The templateUrl property specifies the location of the HTML file that will be used to display the component. The constructor function sets up the initial state of the NameComponent instance. The ngOnInit function is called when the component is initialized, which in this case is when the user loaded the name.sample.html file.
Library: angular
Shortcut: a_component
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'selector-name',
templateUrl: 'name.component.html'
})
export class NameComponent implements OnInit {
constructor() { }
ngOnInit() { }
}