import { Component, OnInit } from '@angular/core';
        selector: 'selector-name',
        templateUrl: 'name.component.html'
      export class NameComponent implements OnInit {
        constructor() { }
        ngOnInit() { }
      Typescript language logo
      your recipe card header background

      Create a Component

      Angular TypeScript Recipes

      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


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.