import { of } from 'rxjs'
import { switchMap } from 'rxjs/operators'
-import { Component, OnInit } from '@angular/core'
+import { AfterViewInit, Component, OnInit } from '@angular/core'
import { Router } from '@angular/router'
-import { AuthService, Notifier } from '@app/core'
+import { AuthService, HooksService, Notifier } from '@app/core'
import {
VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
templateUrl: './video-channel-edit.component.html',
styleUrls: [ './video-channel-edit.component.scss' ]
})
-export class VideoChannelCreateComponent extends VideoChannelEdit implements OnInit {
+export class VideoChannelCreateComponent extends VideoChannelEdit implements OnInit, AfterViewInit {
error: string
videoChannel = new VideoChannel({})
private authService: AuthService,
private notifier: Notifier,
private router: Router,
- private videoChannelService: VideoChannelService
+ private videoChannelService: VideoChannelService,
+ private hooks: HooksService
) {
super()
}
})
}
+ ngAfterViewInit () {
+ this.hooks.runAction('action:video-channel-create.init', 'video-channel')
+ }
+
formValidated () {
this.error = undefined