ionic-team / ionic-team/ionic-framework

Ionic 4 Modal not appearing with transparent background

Offen
#18,589 11 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
package: core type: bug
Vorherrschende Sprache
TypeScript
Sterne
52.7k
Forks
13.3k
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
51

Beschreibung

**Ionic version:**

[x] **4.x**

**I'm submitting a ...**

[ ] bug report
[ ] feature request

**Current behavior:**

My Modal is appearing with a solid background/Overlay

**Expected behavior:**

I want my modal to appear with a transparent background/overlay
**Steps to reproduce:**

**Related code:**

```
insert short code snippets here
modal.scss :
.main_view{
background: transparent;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
opacity: .5;
background-color: #333;

}

modal.html:



and .ts to invoke modal in my app:

async confirm(){

const modal = await this.modalCtrl.create({
component: ModalPage,
// componentProps: {value : "test"},
});
await modal.present();
modal.onDidDismiss().then(res => {
console.log(JSON.stringify(res))
this.isModalDismiss = res.data.isDismiss;
console.log(this.isModalDismiss)
this.routeDriver();
});
}

```

**Other information:**

**Ionic info:**

```
insert the output from ionic info here
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.