Skip to content

Module: backend

eviratec.software edited this page May 12, 2017 · 2 revisions

backendService.getListItemById(id)

Fetch a single ListItem identified by the ID property in attrs, from the backend.

Usage example

backendService
  .getListItemById(137)
  .then(function (res) => {
    let listItem = res.data;
  })
  .catch(function (err) => {
       *

  });

backendService.login(attrs)

Attempt to authenticate via backend using credentials provided in attrs argument.

Usage example

let credentials = {
  EmailAddress: 'tester@localhost',
  Password: 'mypassword1'
};
backendService
  .login(credentials)
  .then(function (res) => {
    let session = res.data;
  })
  .catch(function (err) => {
  });
Clone this wiki locally