+ constructor(
+ private router: Router,
+ private authService: AuthService,
+ private configService: ConfigService,
+ private userService: UserService,
+ private videoService: VideoService,
+ viewContainerRef: ViewContainerRef
+ ) {}
+
+ ngOnInit() {
+ if (this.authService.isLoggedIn()) {
+ // The service will automatically redirect to the login page if the token is not valid anymore
+ this.userService.checkTokenValidity();
+ }
+
+ this.configService.loadConfig();
+ this.videoService.loadVideoCategories();
+ this.videoService.loadVideoLicences();
+ this.videoService.loadVideoLanguages();
+ }