eakoriakin / ionic-selectable

Ionic Selectable is an Ionic versatile and highly customizable component that serves as a replacement to Ionic Select, and allows to search items, including async search, create items, customize the layout with templates and much more. It provides an intuitive API and is easy to set up and use.
MIT License
549 stars 125 forks source link

Issue with Ionic 5 and angular 13 #369

Closed mohamadnajiya closed 2 years ago

mohamadnajiya commented 2 years ago

Hello, I am facing an issue when implementing the ionic-selectable. it is not working with Ionic 5 and angular 13.

Error in HTML page :

Can't bind to 'items' since it isn't a known property of 'select-searchable'

Ionic version : 5.4.16 Angular CLI: 13.1.2 Node: 16.13.1 Package Manager: npm 8.1.2 OS: win32 x64 Angular: 13.1.1

Package Version

@angular-devkit/architect 0.1301.2 @angular-devkit/build-angular 13.1.4 @angular-devkit/core 13.1.2 @angular-devkit/schematics 13.1.2 @angular/cli 13.1.2 @angular/language-service 12.0.5 @schematics/angular 13.1.2 rxjs 7.4.0 typescript 4.5.4

IonicSelectableModule has already been imported in the lazy loaded page and app.module.ts

mohamadnajiya commented 2 years ago

Hello,

In case anyone face the same issue, I just solved it by adding the below:

  1. Add enableIvy to angularCompilerOptions to tsconfig.json

    "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, "enableIvy": false }

  2. Add the below to package.json:

"scripts": { "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points", }

Go the solution from https://github.com/danielsogl/awesome-cordova-plugins/issues/3410