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

Version 5.0.1 breaks Angular 5 support #435

Open
mc-suchecki opened this issue May 24, 2018 · 10 comments
Open

Version 5.0.1 breaks Angular 5 support #435

mc-suchecki opened this issue May 24, 2018 · 10 comments

Comments

@mc-suchecki
Copy link

IMPORTANT: Please provide a sample using: http://plnkr.co/edit/lV7zsw7Yqossgs9JOfQU?p=preview

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    Bug

  • What is the current behavior?
    After the upgrade to version 5.0.1 while still using Angular 5 (tested with 5.2.11 and 5.2.10) application hangs after trying to open any modal. There is no error in the developer console.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use one of the templates above as a starting point).

  1. Install Angular 5.2.11 and ngx-modialog 5.0.1.
  2. Open your application.
  3. Try to open any modal.

I guess plnkr is not necessary, I could provide it in case that is not true.

  • What is the expected behavior?
    Modals should open without hanging the application.

  • What is the motivation / use case for changing the behavior?
    n/a

  • Please tell us about your environment:

  • Angular version: 5.2.11
  • Browser: tested on Chrome 66 and Firefox 61 - both behave the same
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
@lexstark
Copy link

+1 Issue gave us a surprise 30 minutes before the demonstration xD (((

@shlomiassaf
Copy link
Owner

shlomiassaf commented May 24, 2018 via email

@lexstark
Copy link

Already found this solution!

@shlomiassaf
Copy link
Owner

shlomiassaf commented May 24, 2018 via email

@lexstark
Copy link

I'm about using 5.0.0 instead of 5.0.1

@almothafar
Copy link

almothafar commented May 26, 2018

Yes, this release causes a headache for us now, suddenly everything is broken!
When You do something, please use release tab in github and do some notes, also update CHANGELOG!

The modal simply now is showing and not closing, correctly.

Edit: I saw you pushed the version 5.0.1 instead of 6.0.1, the build you did actually was Angular 6 build not Angular 5
https://github.com/shlomiassaf/ngx-modialog/commits/master
https://www.npmjs.com/package/ngx-modialog?activeTab=versions

@SmithaShankar
Copy link

Please help me on the below issue -
I'm trying to migrate application from angular 2 to angular 5.
I installed ngx-modialog the latest version 5.0.1. and getting this error - "error TS2339: Property 'catch' does not exist on type 'DialogRef' ".
below is the code -
context.modal.confirm()
.showClose(true)
.title('Export to excel')
.body(<h5> Do you want to download it in to Excel sheet</h5>)
.okBtn('Ok')
.cancelBtn('Cancel')
.open()
.catch((err: any) => console.log('ERROR: ' + err))
.then((dialog: any) => { return dialog.result })
.then((result: any) => {
context.ExportDataToCSV();
}, () => { });

Thanks in advance..

@Syntaf
Copy link

Syntaf commented Jun 9, 2018

Even on angular4 I'm running into issues with my dialog not properly showing within the DOM on modal opening.

I recommend avoiding 5.0.1 for anyone coming to this issue, 5.0.0 works fine.

@jvanharn
Copy link

jvanharn commented Jun 13, 2018

I found the cause of the bug.

The handling of the bootstrap has changed and has altered the default "in" to "show" class for fading in the modal and backdrop. However, this changed in the minor update.

Please take a look at the following changeset:
ee5ab46#diff-dc430fdc60f96b234eee7ed07f3e7e99L22

When you manually change the class to "in", everything works as expected again.
I will change this reply once I have found a workaround.

You would have to call "bootstrap3Mode", but that is not exported in the latest major version "6.0.0", which causes this same behaviour for me on "6.0.0".

@ablock
Copy link

ablock commented Jun 20, 2018

We had this problem as well. It really does not seem like publishing as 5.0.1 in npm is proper semver given that this is a breaking change for any project on Angular 5.

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

8 participants