I have a DraggableDropZone directive which handles items being dropped on to it. I would like to set this directive on my component based on a boolean flag. Basically sometimes the component needs to be a drop target and sometimes it does not. Attribute binding does not seem to work.
Doesn't work:
<div [attr.DraggableDropZone]="DropZone"></div>
If I simply do this it works, so I know my directive is good:
<div DraggableDropZone></div>
So I need 'DraggableDropZone' to be added conditionally at runtime.