Using the method of sweetAlert2 in angular4, how to get and set data this.XXX in the function after click confirmation

problem description

the angular4
project used by my local framework uses the sweetAlert2 pop-up component
and defines the data
code as follows

export class HeaderComponent implements OnInit {
  public secondNavState:number;
  public busyStateNum:number = 1;
  private dropDownCtrl = 0;
  constructor() { }
}

the following is the method to call sweetAlert

swal({
    type:"warning",
    title:"",
}).then(function(that){
   event.target.parentElement.classList.add("active");
   //angular busyStateNum  thisundefinder
})

Thank you in advance. If you don"t understand, I can continue to add

.

Arrow function

swal({
    type:'warning',
    title:'',
}).then(() => {
   event.target.parentElement.classList.add('active');
   //angular busyStateNum  thisundefinder
   console.log(this)
   ...
})
Menu