Options
All
  • Public
  • Public/Protected
  • All
Menu

An object that represents a promise to be fulfilled, through which the programmer can register callbacks for when the promise is fulfilled successfully or for when an error occurrs. All asyncronous methods from the LacunaWebPKI class return an instance of this object.

For instance, the method listCertificates returns a promise which is fulfilled when the list of certificates is finally available. You could register a callback for when that happens, and another one for if an error occurs, in the following manner:

pki.listCertificates()
.success(function(certs) {
    // Every success callback receives a single argument. Its type (either string, array or object) and meaning depend on the method that returned the promise.
    $scope.certificates = certs;
})
.fail(function (ex) {
       // The fail callback always receives an ExceptionModel object.
    alert('pki error from ' + ex.origin + ': ' + ex.message);
    console.log('pki error', ex);
});

Type parameters

  • T

Hierarchy

  • Promise

Index

Methods

Methods

fail

success

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc