question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compilation error when passing a callback to onDidDismiss / onWillDismiss methods of overlay based components

See original GitHub issue

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.1.0 (/Users/max/.nvm/versions/node/v8.9.3/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.6
   @angular-devkit/core       : 0.7.3
   @angular-devkit/schematics : 0.7.3
   @angular/cli               : 6.1.3
   @ionic/ng-toolkit          : 1.0.7
   @ionic/schematics-angular  : 1.0.5

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none
   Cordova Plugins       : no whitelisted plugins (0 plugins total)

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 1.9.2
   ios-sim           : 5.0.12
   NodeJS            : v8.9.3 (/Users/max/.nvm/versions/node/v8.9.3/bin/node)
   npm               : 6.4.0
   OS                : macOS High Sierra
   Xcode             : Xcode 9.4.1 Build version 9F2000

Environment:

   ANDROID_HOME : /Users/max/Library/Android/sdk

Describe the Bug After update to 4.0.0-beta.6 code that uses overlay based components such as Modals and Alerts does not compile when a callback is passed to onDidDismiss or onWillDismiss methods.

The following error is displayed: error TS2554: Expected 0 arguments, but got 1.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

6reactions
bashoogzaadcommented, Aug 30, 2018

I also had this issue, solved it by using:

Change .onDidDismiss((data) => { to .onDidDismiss().then((data) => {

The documentation lacks some information about this, but I can understand because its still in beta 😉

0reactions
ionitron-bot[bot]commented, Sep 29, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compilation error when passing a callback to onDidDismiss ...
6 code that uses overlay based components such as Modals and Alerts does not compile when a callback is passed to onDidDismiss or...
Read more >
How to pass data on click to modal's backdrop to receive in ...
So I will post here how I did resolve this problem and received modal's data on onDidDismiss function on modal's invoker page:.
Read more >
@ionic/core | Yarn - Package Manager
Ionic is based on Web Components, which enables significant performance, usability, and feature improvements alongside support for popular web frameworks ...
Read more >
Creating Powerful Components with Angular CDK
In this article, we'll learn how to use the Angular CDK overlay feature to create powerful components. We'll accomplish this by creating a ......
Read more >
Using overlay hooks in Ionic React to display ... - YouTube
In this short tutorial, I take you through the new Overlay Hooks that were introduced in version 5.6 of the Ionic Framework.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found