This projects ilustrates the usages of the component checklist.
<app-checklist [elements]=checklistElements (onClick)="logClickedElement($event)"></app-checklist>
In order to render a list of element you need to provide one using [elements] attribute.
Example:
[elements]=myChecklistElements
-
onClick()
-
(onClick)="logClickedElement($event)"
-
Returns the clicked element in the checklist
- getSelectedElements() - returns array of selected elements objects
- getSelectedElementsIds() - returns array of selected elements ids (int)
- addElement(newElement) - adds a new element to the list
Run ng serve
for a dev server. Navigate to http://localhost:4200/
.