Hello there,
I am using Metronic - Vue - v.8.2.0, and I want to use bootstrap instance for showing modals via Javascript function such as:
boostrap.modal.getInstance('').show()
but I get this error "bootstrap is not defined".
I think this is the way metronic works, but How can I inject such instance perfectly without any confliction?
Regards
Renwar
I have just fixed my issue, learning from core/helpers/dom.ts file, by importing Modal instance form bootstrap:
import { Modal } from "bootstrap";
Modal.getInstance('').show()
Hope the others find it useful.
Renwar
Hi Renwar,
Sorry for the late reply.
You can import a separate bootstrap instance from bootstrap dependencies, like Modal, Tooltop, Button, etc., then use them in your component to perform actions.
Please don't hesitate to reach out if you need anything more from us.
Regards,
Lauris Stepanovs,
Keenthemes Support Team