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

Can't bind to 'autostart' since it isn't a known property of 'ngx-smart-modal' #383

Open
prudnikov opened this issue Dec 10, 2023 · 4 comments

Comments

@prudnikov
Copy link

I'm upgrading angular 14 to 15 and ngx-smart-modal from 7.4.1 to 14.0.3 and it start throwing this error.

Error: src/app/supply/my-edit-modal/my-edit-modal.component.html:2:3 - error NG8002: Can't bind to 'autostart' since it isn't a known property of 'ngx-smart-modal'.
1. If 'ngx-smart-modal' is an Angular component and it has 'autostart' input, then verify that it is part of this module.
2. If 'ngx-smart-modal' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

2   [autostart]="true"
    ~~~~~~~~~~~~~~~~~~

  src/app/supply/my-edit-modal/my-edit-modal.component.ts:23:16
    23   templateUrl: './my-edit-modal.component.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component PwfOnPalletEditModalComponent.

But when I look at the source code it indeed exists https://github.com/maximelafarie/ngx-smart-modal/blob/90616b5876de6e7db0913fb65fb66f5e01ba1a58/projects/ngx-smart-modal/src/lib/components/ngx-smart-modal.component.ts#L76C23-L76C23. Any ideas how to fit it?

@beachespecially
Copy link

beachespecially commented Dec 11, 2023

I have the same issue, but with different inputs: closable and hideDelay.
Angular version: 15
ngx-smart-modal version: 14.0.3

NgxSmartModalModule.forRoot() is imported in the app.module.ts

@prudnikov
Copy link
Author

Yes @beachespecially, I have to say that closable, hideDelay and identifier also have the same problem.

@pepas24
Copy link

pepas24 commented Jan 18, 2024

I think this errors is due to version 14.0.3 of ngx-smart-modal was compiled with Angular 16.
I had to copy the code from the library to my application to be able to use it in Angular 14. Just downgrading to use Angular 14 and build it will fix the issue. Maybe the last changes should be published as separete versions 14, 15, 16 to ensure the correct function of library specially because the 14.x version should work with Angular 14 and it doesn't.

@maximelafarie if you are agree a can make separete PR to use angular 14 for the build, and test against 15 and 16 versions, and if necesary make additional PRs for every version.

@Bierat1337
Copy link

@prudnikov as @pepas24 mentioned 14.0.3 is compatible with Angular 16. In your case I recommend upgrade to Angular 16 since you are already upgraded from 14 to 15. So try to get it to 16 without errors and after that probably go for 17 aswell. In 17 are some awesome changes like signals and the new control flow you should use in the near future.

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

4 participants