2016-05-13 07:18:37 -05:00
|
|
|
import { Component } from '@angular/core';
|
2016-08-12 09:52:10 -05:00
|
|
|
import { ROUTER_DIRECTIVES } from '@angular/router';
|
2016-03-14 07:50:19 -05:00
|
|
|
|
2016-08-12 09:52:10 -05:00
|
|
|
import { MenuAdminComponent } from './admin';
|
|
|
|
import { MenuComponent } from './menu.component';
|
|
|
|
import { SearchComponent, SearchService } from './shared';
|
2016-07-08 10:15:14 -05:00
|
|
|
import { VideoService } from './videos';
|
2016-03-14 07:50:19 -05:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-app',
|
2016-06-03 15:08:03 -05:00
|
|
|
template: require('./app.component.html'),
|
|
|
|
styles: [ require('./app.component.scss') ],
|
2016-08-12 09:52:10 -05:00
|
|
|
directives: [ MenuAdminComponent, MenuComponent, ROUTER_DIRECTIVES, SearchComponent ],
|
|
|
|
providers: [ VideoService, SearchService ]
|
2016-03-14 07:50:19 -05:00
|
|
|
})
|
|
|
|
|
|
|
|
export class AppComponent {
|
2016-08-12 09:52:10 -05:00
|
|
|
isInAdmin = false;
|
2016-05-24 16:00:58 -05:00
|
|
|
|
2016-08-12 09:52:10 -05:00
|
|
|
onEnteredInAdmin() {
|
|
|
|
this.isInAdmin = true;
|
2016-03-14 07:50:19 -05:00
|
|
|
}
|
|
|
|
|
2016-08-12 09:52:10 -05:00
|
|
|
onQuittedAdmin() {
|
|
|
|
this.isInAdmin = false;
|
2016-03-14 07:50:19 -05:00
|
|
|
}
|
|
|
|
}
|