[Ionic4] Child component not updating after sending value with alert-prompt

Hi, i’m learning Ionic 4 and i’m trying to change my header component title with a prompt, so when i type something in the prompt and click the “Ok” message, y header component should update with the [title] variable value but it doesn’t until i click the prompt button again or another button it changes the component value.

This is my prompt function:

async presentPrompt(){
    const prompt = await this._alertController.create({

      header:"prompt",
      inputs:[
        {
          name: "prompt1",
          type: "text",
          placeholder: "Page name"
          
        }
      ],
      buttons:[
      {
        text:'ok',
        cssClass: 'secondary',
        handler: (opt) => {
          this.alertName = opt.prompt1;
          console.log(opc)
          console.log(this.alertName);
        }},
        {
          text:'Cancel',
          cssClass: 'secondary',
          handler: (opc) =>{
          }
        }
      ]
    })
    await prompt.present();
  }

And this is my header component implementation

<app-header [title]="alertName || 'My alert'"></app-header>