grails - How to use datasoure in ng2-ya-table? -


in documentation of ng2-ya-table datasource function written in way :

public datasource: = (request: any): observable<any> => { return this.service.getusers(request); } 

and used :

<ng2-ya-table [options]="options" [columns]="columns" [datasource]="datasource" [paging]="paging"> </ng2-ya-table> 

i don't want use function in way because have static

data = [     {         name: 'patricia',         email: 'julianne.oconner@kory.org',         username: 'yes',     },     {         name: 'chelsey dietrich',         email: 'lucio_hettinger@annie.ca',         username: 'no',     } ] 

is possible or obliged render observable type? tried lot using static data in vain

public datasource: = {     return this.data ; } 

why function not working?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -