• function

Adds observable promise methods to can.List.


The can/list/promise plugin adds observable promise methods to can.List. These methods let you know when the list data has been resolved, rejected, or is still pending.

The following demo illustrates how isPending, isResolved and isRejected are used to show the state of the application loading a list. Notice how:

  • Loading is shown as the list is loading.
  • Error is shown when an error on the server happens.
  • No items is shown when there are no items returned by the server.