1 import { Component, OnInit } from '@angular/core'
2 import { NotificationsService } from 'angular2-notifications'
3 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
4 import { I18n } from '@ngx-translate/i18n-polyfill'
5 import { UserSubscriptionService } from '@app/shared/user-subscription'
8 selector: 'my-account-subscriptions',
9 templateUrl: './my-account-subscriptions.component.html',
10 styleUrls: [ './my-account-subscriptions.component.scss' ]
12 export class MyAccountSubscriptionsComponent implements OnInit {
13 videoChannels: VideoChannel[] = []
16 private userSubscriptionService: UserSubscriptionService,
17 private notificationsService: NotificationsService,
22 this.userSubscriptionService.listSubscriptions()
24 res => this.videoChannels = res.data,
26 error => this.notificationsService.error(this.i18n('Error'), error.message)