The 2.0.0 release is introducing a breaking change in method signature, interfaces and default css classes.
This guide is provided to make the transition as painless as possible.
Steps to migrate your code are:
- update the npm package
- change code according to changes
- Update in your package.json
ngx-modal-dialog
to the latest 2.x.x version (check the current release here) - The
dialogInit
method had slightly changed:You can now provide your custom type as a parameter in generic// old signature dialogInit(reference: ComponentRef<IModalDialog>, options?: IModalDialogOptions) { } // new signature dialogInit(reference: ComponentRef<IModalDialog>, options: Partial<IModalDialogOptions<any>> = {}) { }
IModalDialogOptions
interface to enforce types strictness. - Dialog is now using only very basic styles (designed to work on top of Bootstrap 4) so you might need to modify your styles if you were heavily depending on the existing styles.