Skip to content

Commit d182c0b

Browse files
author
pigr2
committed
search box is broken, but all the stuff is running! YEAH! ...and btw, I didn't go home :-)
1 parent d456b7b commit d182c0b

File tree

1 file changed

+27
-33
lines changed

1 file changed

+27
-33
lines changed

app/app.component.ts

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,39 @@ import {Store} from "@ngrx/store";
55
import {CurrentSearch} from "./models/current-search.model";
66
import {SearchResult} from "./models/search-result.model";
77
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-
*/
398

409
@Component({
4110
selector: 'my-app',
4211
template: `
4312
<section class="col-md-8">
4413
<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>
4741
`
4842
})
4943
export class AppComponent implements OnInit {

0 commit comments

Comments
 (0)