2016-05-13 14:18:37 +02:00
|
|
|
import { Component } from '@angular/core';
|
2016-08-21 11:27:24 +02:00
|
|
|
import { Router, ROUTER_DIRECTIVES } from '@angular/router';
|
2016-03-14 13:50:19 +01:00
|
|
|
|
2016-08-12 16:52:10 +02:00
|
|
|
import { MenuAdminComponent } from './admin';
|
|
|
|
import { MenuComponent } from './menu.component';
|
2016-08-23 16:54:21 +02:00
|
|
|
import { RestExtractor, RestService, SearchComponent, SearchService } from './shared';
|
2016-07-08 17:15:14 +02:00
|
|
|
import { VideoService } from './videos';
|
2016-03-14 13:50:19 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-app',
|
2016-06-03 22:08:03 +02:00
|
|
|
template: require('./app.component.html'),
|
|
|
|
styles: [ require('./app.component.scss') ],
|
2016-08-12 16:52:10 +02:00
|
|
|
directives: [ MenuAdminComponent, MenuComponent, ROUTER_DIRECTIVES, SearchComponent ],
|
2016-08-23 16:54:21 +02:00
|
|
|
providers: [ RestExtractor, RestService, VideoService, SearchService ]
|
2016-03-14 13:50:19 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
export class AppComponent {
|
2016-08-21 11:27:24 +02:00
|
|
|
constructor(private router: Router) {}
|
2016-05-24 23:00:58 +02:00
|
|
|
|
2016-08-21 11:27:24 +02:00
|
|
|
isInAdmin() {
|
|
|
|
return this.router.url.indexOf('/admin/') !== -1;
|
2016-03-14 13:50:19 +01:00
|
|
|
}
|
|
|
|
}
|