exists()
checks whether the specified item exists in the component
exists(id: Id): boolean;
Parameters:
id: string
- the id of the item in question
Returns:
true
if the item exists; otherwise, false
.
Example
const item = component.data.exists("1");