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

Getting error while integrating with angular 8 lazy load modules. #10

Closed
BhanuTejP opened this issue Apr 29, 2020 · 3 comments
Closed

Comments

@BhanuTejP
Copy link

BhanuTejP commented Apr 29, 2020

Hi,
I'm trying to integrate image-kit with my angular 8 app.

I followed the documentation for setting up the things.

It is working well if I use <ik-image src="my-img-url" alt="This is an alt"></ik-image> in app.component.html but I'm getting the following error if I use it in my lazy loading module components.
image

To deal with this error, I moved the below code /import to my shared module.

ImagekitioAngularModule.forRoot({
publicKey: environment.publicKey,
urlEndpoint: environment.urlEndpoint,
authenticationEndpoint: environment.authenticationEndpoint + 'image_kit/auth'
}),

But Im getting the below error.

image

So can you please tell me what I am doing wrong/ missing here.

Thank you.

@imagekitio
Copy link
Contributor

Hi @BhanuTejP

Can you please test with the latest version 1.0.1?

@hishamhafeel
Copy link

@imagekitio I also got the same error. If it is imported in AppModule, then I am unable to use it in another module. I also cant import it in multiple modules.
I have used "imagekitio-angular": "^1.0.1" in package.json.

Can you please give a solution for this.
Thank you

@violetviolinist
Copy link
Contributor

violetviolinist commented Jul 28, 2020

@BhanuTejP
@hishamhafeel
Sorry for the delay. The issue has been fixed. You can now import the ImageKit module in lazy modules just like you would in the App module:

image

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