Angular Component with Inline Template

    0

    0

    lucycodes42

    Angular snippets for TypeScript

    This code imports the Component and OnInit interfaces from Angular's core module. It defines a class called NameComponent that implements those interfaces. The class has one constructor that is called when the class is loaded. The ngOnInit() method is defined as a hook that is called when the component is initialized.

    Library: angular

    Shortcut: a_component_inline

    import { Component, OnInit } from '@angular/core';
    
    @Component({
      selector: 'selector-name',
      template: ``
    })
    
    export class NameComponent implements OnInit {
      constructor() { }
    
      ngOnInit() { }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.