Skip to content

Instantly share code, notes, and snippets.

@arturovt
Last active July 28, 2019 17:49
Show Gist options
  • Save arturovt/3f82c4a1f9c641ddacfdf90b83dbf557 to your computer and use it in GitHub Desktop.
Save arturovt/3f82c4a1f9c641ddacfdf90b83dbf557 to your computer and use it in GitHub Desktop.
import { Component, OnInit, AfterViewInit } from '@angular/core';
@Component({
selector: 'app-button',
template: `
<button>{{ text }}</button>
`
})
export class ButtonComponent implements OnInit, AfterViewInit {
public text: string = null;
public ngOnInit(): void {
console.log(`${ButtonComponent.name} ngOnInit...`);
}
public ngAfterViewInit(): void {
console.log(`${ButtonComponent.name} ngAfterViewInit...`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment