aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/app.component.ts
blob: 9d05c272ffc1f47c05f28a78bcafa2fa5a7df62b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                          
                                                            
 

                                                 
                                                                                      
                                        


                       

                                                
                                                                                          
                                                                          


                           
                                        
 

                                                     

   
import { Component } from '@angular/core';
import { Router, ROUTER_DIRECTIVES } from '@angular/router';

import { MenuAdminComponent } from './admin';
import { MenuComponent } from './menu.component';
import { RestExtractor, RestService, SearchComponent, SearchService } from './shared';
import { VideoService } from './videos';

@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 ]
})

export class AppComponent {
  constructor(private router: Router) {}

  isInAdmin() {
    return this.router.url.indexOf('/admin/') !== -1;
  }
}