1 import { Component, OnInit } from '@angular/core'
3 import { NotificationsService } from 'angular2-notifications'
4 import { SortMeta } from 'primeng/primeng'
6 import { ConfirmService } from '../../../core'
7 import { RestTable, RestPagination } from '../../../shared'
8 import { Pod } from '../../../../../../shared'
9 import { FollowService } from '../shared'
12 selector: 'my-followers-list',
13 templateUrl: './followers-list.component.html',
14 styleUrls: [ './followers-list.component.scss' ]
16 export class FollowersListComponent extends RestTable {
20 sort: SortMeta = { field: 'createdAt', order: 1 }
21 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
24 private notificationsService: NotificationsService,
25 private followService: FollowService
30 protected loadData () {
31 this.followService.getFollowers(this.pagination, this.sort)
34 this.followers = resultList.data
35 this.totalRecords = resultList.total
38 err => this.notificationsService.error('Error', err.message)