1
votes

am using nativescript version 2.5.0.My app is successfully worked in web. but in nativescript it will not get displaying anything.

tns.html

<GridLayout rows="*">

<ListView [items]="views$ | async" (itemTap)="onClickView($event.view.bindingContext)">
  <template let-view="item">
    <Label [text]="view"></Label>
  </template>
</ListView>

</GridLayout>

component.ts

@Component({
moduleId: module.id,
selector: 'sd-list',
templateUrl: 'list.component.html',
styleUrls: ['list.component.css']
})
export class ListComponent implements OnInit {
public views$: Observable<any>;


constructor(private store: Store<IAppState>, private route: ActivatedRoute) {
console.log("Inside listcomonent"); -----> This console is working
this.views$ = store.let(getViews);

this.listType$ = store.let(getListType);
}
}

This is what i have. in my web application the list view is populated with the values. but in case of native script(android) nothing get displaying. what should i do? any help will highly appreciable and helpful.

1
Are you able to debug the app on chrome? you may see there must be something not working on Android. - MobileEvangelist

1 Answers

0
votes

Perhaps the issue has been related to the way you are setting up the text property of the Label. You could try the following code <Label [text]="item.view"></Label>. For further help, you could also review the sample here, where has been shown a simple example with ListView and async pipe.