UNPKG

@nativescript/template-hello-world-ng-vision

Version:
19 lines (14 loc) 402 B
import { Component, OnInit } from '@angular/core' import { Item } from './item' import { ItemService } from './item.service' @Component({ selector: 'ns-items', templateUrl: './items.component.html', }) export class ItemsComponent implements OnInit { items: Array<Item> constructor(private itemService: ItemService) {} ngOnInit(): void { this.items = this.itemService.getItems() } }