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


                                                          
                                        


                       

                                                

                                                                                          


                           
                    
 

                          

   

                           

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

import { MenuAdminComponent } from './admin';
import { MenuComponent } from './menu.component';
import { 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: [ VideoService, SearchService ]
})

export class AppComponent {
  isInAdmin = false;

  onEnteredInAdmin() {
    this.isInAdmin = true;
  }

  onQuittedAdmin() {
    this.isInAdmin = false;
  }
}