When using @ng-dnd
, you follow this general pattern:
- Create a connection and specify its behaviour: Creating Connections
- Use directives or methods to connect it to real DOM elements:
Connecting to DOM
- Use the connection's
listen
method to listen for relevant state changes, and respond to them:
Monitoring State
- Remember to destroy the connection in
ngOnDestroy()
. Refer to part 1