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

Property 'then' does not exist on type 'DialogRef<TwoButtonPreset>'.ts(2339) #450

Open
ayouuuuub opened this issue May 28, 2020 · 1 comment

Comments

@ayouuuuub
Copy link

Hi i'm trying to run this code on Angular6 after updating from angular2-modal to ngx-modialog

this.modal.confirm()
      .showClose(true)
      .title(this.translator.instant('common.message.confirm.delete'))
      .keyboard(27)
      .okBtn(this.translator.instant('common.text.yes'))
      .cancelBtn(this.translator.instant('common.text.no'))
      .message("<h5>" + this.translator.instant('common.message.confirm.deleteAll') + "</h5>")
      .open()
      .then(( d:any ) => d.result 

but after compiling i get this error :

Property 'then' does not exist on type 'DialogRef<TwoButtonPreset>'.ts(2339)
@nguyenbathanh
Copy link

nguyenbathanh commented Oct 28, 2020

this.modal.confirm()
      .showClose(true)
      .title(this.translator.instant('common.message.confirm.delete'))
      .keyboard(27)
      .okBtn(this.translator.instant('common.text.yes'))
      .cancelBtn(this.translator.instant('common.text.no'))
      .message("<h5>" + this.translator.instant('common.message.confirm.deleteAll') + "</h5>")
      .open()
      .result
      .then(( d:any ) => d.result 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants