Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0-rc.9: Typescript error using willAnimate property of ModalOptions when creating modal. #14775

Closed
JamieWritesCode opened this issue Jul 14, 2018 · 3 comments
Assignees

Comments

@JamieWritesCode
Copy link

JamieWritesCode commented Jul 14, 2018

Bug Report

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

Ionic:

   ionic (Ionic CLI)          : 4.0.0-rc.9 (C:\Users\jamie\AppData\Roaming\nvm\v8.9.1\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-alpha.9
   @angular-devkit/core       : 0.7.0-rc.1
   @angular-devkit/schematics : 0.7.0-rc.1
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0-rc.9
   @ionic/schematics-angular  : 1.0.0-rc.9

System:

   NodeJS : v8.9.1 (C:\Program Files\nodejs\node.exe)
   npm    : 5.5.1
   OS     : Windows 10

Describe the Bug
When creating a modal using ModalController, the property willAnimate does not appear to be part of the interface causing editors to flag an error:

Object literal may only specify known properties, and 'willAnimate' does not exist in type 'ModalOptions'.

Project then won't compile.

Steps to Reproduce

Create a modal using ModalController and specify the willAnimate property in the options using a TypeScript aware editor.

Related Code

    const modal = await this.modalCtrl.create({
      component: ModalComponent,
      willAnimate: false,
    });
@ionitron-bot ionitron-bot bot added the triage label Jul 14, 2018
@JamieWritesCode
Copy link
Author

JamieWritesCode commented Jul 14, 2018

The ModalOptions interface is declared at @ionic\core\dist\types\components\modal\modal-interface.d.ts and clearly doesn't have the willAnimate property in it.

Adding the line willAnimate?: boolean; to the interface allows me to compile and the functionality appears to work as expected. Is this property being phased out or phased in?

export interface ModalOptions {
    component: ComponentRef;
    componentProps?: ComponentProps;
    showBackdrop?: boolean;
    enableBackdropDismiss?: boolean;
    enterAnimation?: AnimationBuilder;
    leaveAnimation?: AnimationBuilder;
    cssClass?: string | string[];
    delegate?: FrameworkDelegate;
    willAnimate?: boolean;
}

@goelectricstations
Copy link

same issue

@ionitron-bot ionitron-bot bot removed the triage label Aug 26, 2018
@manucorporat manucorporat self-assigned this Aug 26, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 25, 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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants