Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Component, OnInit, ChangeDetectionStrategy, Input} from '@angular/core';
- @Component({
- selector: "PrincipalEventosListView",
- templateUrl: "pages/principal/eventos/eventos.component.html",
- changeDetection: ChangeDetectionStrategy.OnPush,
- })
- export class PrincipalEventosComponent {
- public registros: Array<any>;
- constructor() {
- this.registros = [];
- this.registros.push({tipo: "Teste 1"});
- this.registros.push("String no lugar de objeto.");
- this.registros.push({tipo: "Teste 3"});
- this.registros.push(123);
- this.registros.push({tipo: "Teste 4"});
- }
- }
- <GridLayout>
- <ListView [items]="registros">
- <template let-item="item">
- <Label [text]="item.tipo"></Label>
- </template>
- </ListView>
- import { NativeScriptModule } from "nativescript-angular/nativescript.module";
- import { NativeScriptUIListViewModule } from "nativescript-ui-listview/angular";
- import { NativeScriptModule } from "nativescript-angular/nativescript.module";
- @NgModule({
- ...
- imports: [NativeScriptModule],
- ...
- })
Add Comment
Please, Sign In to add comment