Skip to content
Diego van Haaster edited this page Feb 23, 2022 · 2 revisions
let airportsResource = this.airportsService.entities();
let airportResource = airportsResource.entity('RDA');

key

let newAirportResource = airportResource.key('RAD');

keys

let newAirportResource = airportResource.keys(['RAD', 'ERD']);

media

let mediaAirportResource = airportResource.media();

navigationProperty

let navResource = airportResource.navigationProperty('nav');

property

let propResource = airportResource.property('prop');

action

let actionResource = airportResource.action('Default.Action');

function

let functionResource = airportResource.function('Default.Function');

cast

let castResource = airportResource.cast('Type');

update

airportResource.update(airport).subscribe();

modify

airportResource.modify(airport).subscribe();

destroy

airportResource.destroy().subscribe();

fetch

airportResource.fetch().subscribe(({ entity, annots }) => {
  console.log('Airport: ', entity);
  console.log('Annotations: ', annots);
});

fetchEntity

airportResource.fetchEntity().subscribe((airport) => {
  console.log('Airport: ', airport);
});

fetchModel

airportResource.fetchModel().subscribe((model) => {
  console.log('Airport: ', model);
});
Clone this wiki locally