PeerTube/client/src/app/app.component.ts

24 lines
779 B
TypeScript
Raw Normal View History

2016-05-13 14:18:37 +02:00
import { Component } from '@angular/core';
import { Router, ROUTER_DIRECTIVES } from '@angular/router';
2016-03-14 13:50:19 +01:00
import { MenuAdminComponent } from './admin';
import { MenuComponent } from './menu.component';
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',
template: require('./app.component.html'),
styles: [ require('./app.component.scss') ],
directives: [ MenuAdminComponent, MenuComponent, ROUTER_DIRECTIVES, SearchComponent ],
providers: [ RestExtractor, RestService, VideoService, SearchService ]
2016-03-14 13:50:19 +01:00
})
export class AppComponent {
constructor(private router: Router) {}
2016-05-24 23:00:58 +02:00
isInAdmin() {
return this.router.url.indexOf('/admin/') !== -1;
2016-03-14 13:50:19 +01:00
}
}