Advanced User Interface Controls and Components
Occurs after all items are removed from the TreeView or from specified parent item.
Param | Type | Details |
---|---|---|
e | Object | An event object which contains the parent item from which items are removed |
This event can be handled by creating a function in your application controller $scope and applying this function as value to an attribute in TreeView directive:
The events attribute has a higher priority than the clear attribute. If both attributes are set, the value from events attribute is used.
If all items are removed from the TreeView, parent object within the event data is set to null.
Supported in: v1.0.
Learn how to add or remove items in TreeView for AngularJS using several different methods. Each operation is followed by events which can be handled in your code.
A sample which demonstrates how to handle different events in TreeView directive.