Open inline modal from function

I use Ionic6 with inline modals. I can open modals buy but I need to show an inline modal dynamically when a parameter comes true, from a function. How is it possible ? Thx !

yes it’s possibile.

 <ion-modal [isOpen]="isModalOpen">
          <ion-buttons slot="end">
            <ion-button (click)="setOpen(false)">Close</ion-button>
      <ion-content class="ion-padding">
         Your content

in your ts file

import { Component } from '@angular/core';

  selector: 'app-example',
  templateUrl: 'example.component.html',
export class ExampleComponent {
  isModalOpen = false;

yourFunction() {
// here you can check your parameter
  if(yourParameter) {
  setOpen(isOpen: boolean) {
    this.isModalOpen = isOpen;

Thank you ! [isOpen] is just what I was looking for ! :pray: