0
2
JRJose Romero
The code in the @Component annotation defines the selector and templateUrl for a component. The constructor() method is also defined. ngOnInit() is called when the component is initialized.
Library: angular
Shortcut: angular.component
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'selector-name',
templateUrl: 'name.component.html'
})
export class NameComponent implements OnInit {
constructor() { }
ngOnInit() { }
}