app.component.ts 469 Bytes
Newer Older
Ooh-Ao committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import { Component, Renderer2 } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  constructor(private renderer: Renderer2) {}

  ngOnInit() {
    // Use Renderer2 to append an element to the html element
    const newElement = this.renderer.createElement('html');
    this.renderer.appendChild(document.body, newElement);
  }

  title = 'synto';
}