ngx-modialog icon indicating copy to clipboard operation
ngx-modialog copied to clipboard

Version 5.0.1 breaks Angular 5 support

Open mc-suchecki opened this issue 6 years ago • 10 comments

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)

mc-suchecki avatar May 24 '18 09:05 mc-suchecki

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

lexstark avatar May 24 '18 11:05 lexstark

Sorry about that

For angular 5 use the previous major version for now

On Thu, 24 May 2018 at 14:48 Alexey [email protected] wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shlomiassaf/ngx-modialog/issues/435#issuecomment-391685410, or mute the thread https://github.com/notifications/unsubscribe-auth/AFIN3a2N8Rpwgx26-TYiLlLCFbDE96aHks5t1p30gaJpZM4UL7nQ .

shlomiassaf avatar May 24 '18 11:05 shlomiassaf

Already found this solution!

lexstark avatar May 24 '18 11:05 lexstark

Could you please share?

On Thu, 24 May 2018 at 14:53 Alexey [email protected] wrote:

Already found this solution!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/shlomiassaf/ngx-modialog/issues/435#issuecomment-391686644, or mute the thread https://github.com/notifications/unsubscribe-auth/AFIN3aXunLt7ErL2xwGqZ4YjShJScBooks5t1p8cgaJpZM4UL7nQ .

shlomiassaf avatar May 24 '18 12:05 shlomiassaf

I'm about using 5.0.0 instead of 5.0.1

lexstark avatar May 24 '18 12:05 lexstark

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

almothafar avatar May 26 '18 18:05 almothafar

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<TwoButtonPreset>' ". 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..

SmithaShankar avatar May 29 '18 11:05 SmithaShankar

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.

Syntaf avatar Jun 09 '18 17:06 Syntaf

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: https://github.com/shlomiassaf/ngx-modialog/commit/ee5ab46df503e2b7cec933141428972790ed6abd#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".

jvanharn avatar Jun 13 '18 13:06 jvanharn

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.

ablock avatar Jun 20 '18 17:06 ablock