I have 2 functions one func1 and func2, I need to execute the func2 only after func1 will execute. Here the code below
home.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
 constructor() { }
 ngOnInit() {
    this.func1();
    this.func2();
 }
 func1(){
    console.log('function1')
 }
 func2(){
    console.log('function2')
 }
}
 
     
    