Closed Sami-Kachai closed 1 year ago
Hello,
I am trying to use the ngx-sweetalert2 component with Angular 10.0.11, I imported the SweetAlert2Module in the app.module.ts file (forRoot()) and I still get the following error :
error NG8001: 'swal' is not a known element: 1. If 'swal' is an Angular component, then verify that it is part of this module. 2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
This is the swal component : <swal title="test" #deleteSwal> <div *swalPortal class="alert alert-info"> test
Would you kindly help me with this ?
Best Regards.
How is this component module imports? You have the import for the SweetAlert2Module in this component module?
What version of ngx-sweetalert2 you are using for the Angular 10?
Almost the same here, including the module import in the app module... In package.json:
"dependencies": {
"sweetalert2": "^11.4.32",
"@sweetalert2/ngx-sweetalert2": "^11.0.0",
}
In page.html
<swal-icon type="warning" color="red"></swal-icon>
'swal-icon' is not a known element:
1. If 'swal-icon' is an Angular component, then verify that it is part of this module.
2. If 'swal-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.ngtsc(-998001)
closing due to inactivity
Hello,
I am trying to use the ngx-sweetalert2 component with Angular 10.0.11, I imported the SweetAlert2Module in the app.module.ts file (forRoot()) and I still get the following error :
error NG8001: 'swal' is not a known element:
This is the swal component : <swal title="test" #deleteSwal> <div *swalPortal class="alert alert-info"> test
Would you kindly help me with this ?
Best Regards.