ImageInputComponent on angular project
Hello.
Im trying to implement the avatar option on an angular project using ImageInputComponent.
I have bootstrap ImageInputComponent on the ngOnInit of my component like this:
ImageInputComponent.bootstrap('#my-avatar')
But this is not working, the cancel or remove options, never worked and I have to implement my own functions to make the add option to work.
How can I implement the image input component properly on the new component form that I'm trying to create, any ideas?
Thanks
Replies (1)
Hello Damaris,
If the cancel and remove options of the ImageInputComponent are not working as expected, you can try adding the following attributes to the corresponding buttons:
For the cancel option:
[data-kt-image-input-action="cancel"] For the remove option:
[data-kt-image-input-action="remove"] Make sure these attributes are added to the appropriate buttons in your HTML markup. These attributes are used by the ImageInputComponent to identify and handle the corresponding actions.
By including these attributes, the ImageInputComponent should be able to recognize and respond to the cancel and remove options correctly.
Please give this a try and let me know if it resolves the issue. If you have any further questions or concerns, feel free to ask.
Best regards