@c8y/apps
Version:
Cumulocity IoT applications
26 lines (24 loc) • 604 B
text/typescript
import { Component } from '@angular/core';
import { InventoryService } from '@c8y/client';
export class ComponentOne {
mos: any[];
constructor(private inventory: InventoryService) {
this.fetch();
}
async fetch() {
const { data } = await this.inventory.list({ type: 'c8y_DeviceGroup', pageSize: 100 });
this.mos = data;
}
}