@@ -5,45 +5,39 @@ import {Store} from "@ngrx/store";
5
5
import { CurrentSearch } from "./models/current-search.model" ;
6
6
import { SearchResult } from "./models/search-result.model" ;
7
7
import { YouTubeService } from "./services/youtube.service" ;
8
- import { SearchBox } from "./components/search-box.component" ;
9
- import { ProximitySelector } from "./components/proximity-selector.component" ;
10
-
11
- /*
12
- <div class="row col-md-8">
13
- <search-box [store]="store"></search-box>
14
- <proximity-selector [store]="store" [disabled]="disableSearch"
15
- [ngClass]="{ disabled: disableSearch }"></proximity-selector>
16
- </div>
17
- <div class="row col-md-8 alert alert-danger" *ngIf="disableSearch">
18
- <p>Can't use geolocalization with an empty searchbox</p>
19
- </div>
20
- <div class="row col-md-8">
21
- <p>
22
- Try to type something in the searchbox, play with the location and with radius: the above state will
23
- always be consistent and up to date.
24
- </p>
25
- <p class="state">{{ state | json }}</p>
26
- <p class="state" *ngIf="disableSearch">{ }</p>
27
- </div>
28
- <h2 *ngIf="!disableSearch">Search results:</h2>
29
- <h2 *ngIf="disableSearch || searchResults.length == 0">No results</h2>
30
- <div class="row col-md-8">
31
- <div *ngFor="let result of searchResults" class="thumbnail col-sm-6 col-md-4">
32
- <div class="caption">
33
- <h3>{{ result.title }}</h3>
34
- </div>
35
- <!--<img src="{{ result.thumbnailUrl }}" />-->
36
- </div>
37
- </div>
38
- */
39
8
40
9
@Component ( {
41
10
selector : 'my-app' ,
42
11
template : `
43
12
<section class="col-md-8">
44
13
<h1>{{title}}</h1>
45
-
46
- </section>
14
+ <div class="row col-md-8">
15
+ <search-box [store]="store"></search-box>
16
+ <proximity-selector [store]="store" [disabled]="disableSearch"
17
+ [ngClass]="{ disabled: disableSearch }"></proximity-selector>
18
+ </div>
19
+ <div class="row col-md-8 alert alert-danger" *ngIf="disableSearch">
20
+ <p>Can't use geolocalization with an empty searchbox</p>
21
+ </div>
22
+ <div class="row col-md-8">
23
+ <p>
24
+ Try to type something in the searchbox, play with the location and with radius: the above state will
25
+ always be consistent and up to date.
26
+ </p>
27
+ <p class="state">{{ state | json }}</p>
28
+ <p class="state" *ngIf="disableSearch">O</p>
29
+ </div>
30
+ <h2 *ngIf="!disableSearch">Search results:</h2>
31
+ <h2 *ngIf="disableSearch || searchResults.length == 0">No results</h2>
32
+ <div class="row col-md-8">
33
+ <div *ngFor="let result of searchResults" class="thumbnail col-sm-6 col-md-4">
34
+ <div class="caption">
35
+ <h3>{{ result.title }}</h3>
36
+ </div>
37
+ <!--<img src="{{ result.thumbnailUrl }}" />-->
38
+ </div>
39
+ </div>
40
+ </section>
47
41
`
48
42
} )
49
43
export class AppComponent implements OnInit {
0 commit comments