shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 241 forks source link

Version 5.0.1 breaks Angular 5 support #435

Open mc-suchecki opened 6 years ago

mc-suchecki commented 6 years ago

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

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

lexstark commented 6 years ago

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

shlomiassaf commented 6 years ago

Sorry about that

For angular 5 use the previous major version for now

On Thu, 24 May 2018 at 14:48 Alexey notifications@github.com 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 .

lexstark commented 6 years ago

Already found this solution!

shlomiassaf commented 6 years ago

Could you please share?

On Thu, 24 May 2018 at 14:53 Alexey notifications@github.com 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 .

lexstark commented 6 years ago

I'm about using 5.0.0 instead of 5.0.1

almothafar commented 6 years ago

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 commented 6 years ago

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(`

Do you want to download it in to Excel sheet
        `)
            .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 commented 6 years ago

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 commented 6 years ago

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

ablock commented 6 years ago

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.