API Docs for: trial
Show:

nx.data.Counter Class

Module: nx.data

Methods

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

clearBinding

(
  • prop
)

Inherited from nx.Observable:

Clear binding for specified property.

Parameters:

decrease

(
  • item
  • decrement
)

Decrease the count of given item.

Parameters:

  • item Any

    The item to count.

  • decrement Number

    The decrement, default 1.

Returns:

The decreasing result

dispose

()

Inherited from nx.Observable:

Dispose current object.

getBinding

(
  • prop
)

Inherited from nx.Observable:

Get existing binding object for specified property.

Parameters:

Returns:

:

getCount

(
  • item
)

Get count of specified item.

Parameters:

  • item Any

    The counting item.

Returns:

Count of the item.

increase

(
  • item
  • increment
)

Increase the count of given item.

Parameters:

  • item Any

    The item to count.

  • increment Number

    The increment, default 1.

Returns:

The increasing result

notify

(
  • names
  • oldValue
)

Inherited from nx.Observable:

Parameters:

setBinding

(
  • prop
  • expr
  • source
)

Inherited from nx.Observable:

Set binding for specified property.

Parameters:

setCount

(
  • item
  • count
)

Set count of specified item.

Parameters:

  • item Any

    The counting item.

  • count Number

    The count to be set.

Returns:

Set result count.

unwatch

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

Events

change

An event which notifies the happening of a count change of item.

Event Payload:

  • evt Object

    The event object with item, count, previousCount.

decrease

Same as change event but only happens on count decreasing.

Event Payload:

  • evt Object

    The event object with item, count, previousCount.

increase

Same as change event but only happens on count increasing.

Event Payload:

  • evt Object

    The event object with item, count, previousCount.