mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-15 12:55:14 +00:00
28 lines
667 B
TypeScript
28 lines
667 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
@Component({
|
|
selector : 'fuse-ngx-datatable',
|
|
templateUrl: './ngx-datatable.component.html',
|
|
styleUrls : ['./ngx-datatable.component.scss']
|
|
})
|
|
export class FuseNgxDatatableComponent implements OnInit
|
|
{
|
|
rows: any[];
|
|
loadingIndicator = true;
|
|
reorderable = true;
|
|
|
|
constructor(private http: HttpClient)
|
|
{
|
|
}
|
|
|
|
ngOnInit()
|
|
{
|
|
this.http.get('api/contacts-contacts')
|
|
.subscribe((contacts: any) => {
|
|
this.rows = contacts;
|
|
this.loadingIndicator = false;
|
|
});
|
|
}
|
|
}
|