Skip to main content

exists()

checks whether the specified item exists in the component

exists(id: Id): boolean;

Parameters:

id: string | number - the id of the item in question

Returns:

true, if the item exists; otherwise, false.

Example

var item = component.data.exists("1"); 

Related sample: Data. Exists