imagekit-angular icon indicating copy to clipboard operation
imagekit-angular copied to clipboard

Make SDK compatible with Angular 18

Open hypnotoad08 opened this issue 6 months ago • 0 comments

I am attempting to use this SDK in an Angular 18 project and it is incompatible. I see the library is targeting Angular 12 which was released 3 years ago and has been out of active support for 2 years and 9 months. - https://endoflife.date/angular

I have bumped the dependencies up to Angular 16 and made a change to the imagekitio-angular.module.ts to include CUSTOM_ELEMENTS_SCHEMA as elements like <ik-upload> are invalid with out it.

I have built the library, packaged it, and installed it locally in my app. I am now able to use <ik-upload> in my standalone Angular 18 components.

In addition to installing the custom built version of the SDK, Angular 18 requires you to use the following syntax when defining the ImagekitioAngularModule.forRoot in my AppConfig providers.

importProvidersFrom( ImagekitioAngularModule.forRoot({
      urlEndpoint: "endpointURL",
      publicKey: "",
    })

hypnotoad08 avatar Aug 20 '24 21:08 hypnotoad08