1 import { Component } from '@angular/core'
2 import { NotificationsService } from 'angular2-notifications'
3 import { SortMeta } from 'primeng/primeng'
4 import { AccountFollow } from '../../../../../../shared/models/accounts/follow.model'
5 import { RestPagination, RestTable } from '../../../shared'
6 import { FollowService } from '../shared'
9 selector: 'my-followers-list',
10 templateUrl: './following-list.component.html'
12 export class FollowingListComponent extends RestTable {
13 following: AccountFollow[] = []
16 sort: SortMeta = { field: 'createdAt', order: 1 }
17 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
20 private notificationsService: NotificationsService,
21 private followService: FollowService
26 protected loadData () {
27 this.followService.getFollowing(this.pagination, this.sort)
30 this.following = resultList.data
31 this.totalRecords = resultList.total
34 err => this.notificationsService.error('Error', err.message)