]>
Commit | Line | Data |
---|---|---|
230809ef | 1 | import { Component } from '@angular/core'; |
602eb142 | 2 | import { ROUTER_DIRECTIVES } from '@angular/router'; |
dc8bc31b | 3 | |
602eb142 C |
4 | import { MenuAdminComponent } from './admin'; |
5 | import { MenuComponent } from './menu.component'; | |
6 | import { SearchComponent, SearchService } from './shared'; | |
0629423c | 7 | import { VideoService } from './videos'; |
dc8bc31b C |
8 | |
9 | @Component({ | |
10 | selector: 'my-app', | |
4a6995be C |
11 | template: require('./app.component.html'), |
12 | styles: [ require('./app.component.scss') ], | |
602eb142 C |
13 | directives: [ MenuAdminComponent, MenuComponent, ROUTER_DIRECTIVES, SearchComponent ], |
14 | providers: [ VideoService, SearchService ] | |
dc8bc31b C |
15 | }) |
16 | ||
17 | export class AppComponent { | |
602eb142 | 18 | isInAdmin = false; |
a99593ed | 19 | |
602eb142 C |
20 | onEnteredInAdmin() { |
21 | this.isInAdmin = true; | |
dc8bc31b C |
22 | } |
23 | ||
602eb142 C |
24 | onQuittedAdmin() { |
25 | this.isInAdmin = false; | |
dc8bc31b C |
26 | } |
27 | } |