Hi, I want to ask about configuration of project, if i create a new vue project and add dependency following package.json file inside metronic_vue_v8.1.6_demo2 folder and copy assets folder into my new vue project. how can i use
<button
type="button"
class="btn btn-sm btn-icon btn-color-primary btn-active-light-primary"
data-kt-menu-trigger="click"
data-kt-menu-placement="bottom-end"
data-kt-menu-flip="top-end"
>
</button>
when i appy data-kt-menu-trigger or any data-kt-something, it's does not work with my new vue project
Hi,
Thank you for reaching out to us.
To use our menu component you should initialize it. In the default Metronic project we initialize our components globally on the page first load and then reinitialize them on every route change with initialization and reinitialization function from src/core/plugins/keenthemes.ts.
Here is an initialization example:
onMounted(() => {
nextTick(() => {
initializeComponents();
});
});
watch(
() => route.path,
() => {
nextTick(() => {
reinitializeComponents();
});
}
);