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