Can the Drawer widget be used in a ngFor loop in Angular
I noticed in the documents that HTML components cannot be used directly in Angular, however, the drawer is displayed in the angular demo.
I've attemtped to use the drawer within a for loop (ngFor) and I'm unable to get it to function (i.e open the drawer).
I'm using a object's ID for the button ID :
class="btn btn-outline btn-outline-dashed btn-outline-primary btn-active-light-primary btn-hover-rise me-5">
and setting the data-kt-drawer-toggle using [attr.data-kt-drawer-toggle] :
<div id="kt_drawer_example_basic" class="bg-white" data-kt-drawer="true" data-kt-drawer-activate="true"
The ids and drawer-toggle attribute are being applied correctly, however, the drawer is not opening.
In your code I don't see
id attribute, it should be unique (and based on this id you have to rename 'close+toggle' attribute. Check the example from 'src/_metronic/partials/layout/activity-drawer/ActivityDrawer.tsx'.