commit 7f4959aa19394644eafcf6f4ba19caf06f2aaea3
parent b83a5496533d50edb2e1ff0f804c7b2acc22c92b
Author: MTRNord <mtrnord1@gmail.com>
Date: Wed, 21 Mar 2018 20:09:03 +0100
Try to fix the api calling
Diffstat:
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/app/api.service.ts b/src/app/api.service.ts
@@ -49,8 +49,8 @@ export class ApiService {
return this.http.get<Tweet>(`${this.url}/paper/${uuid}/yesterday`);
}
- getPapers(): Observable<Paper[]> {
- return this.http.get<Paper[]>(`${this.url}/papers`);
+ getPapers(): Observable<(Paper)[]> {
+ return this.http.get<(Paper)[]>(`${this.url}/papers`);
}
getPaper(uuid: string): Observable<Paper> {
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
@@ -17,7 +17,7 @@ export class AppComponent {
}
checkCurrent(path = '/'): string {
- const active = (this.currentUrl === path) ? 'active' : null;
+ const active = (this.currentUrl === path) ? 'active' : '';
console.log('Route: ' + path + ' Current: ' + this.currentUrl + ' Active?: ' + active);
return active;
}
diff --git a/src/app/tweet-list/tweet-list.component.ts b/src/app/tweet-list/tweet-list.component.ts
@@ -12,7 +12,6 @@ import 'rxjs/add/observable/throw';
import {ToastrService} from 'ngx-toastr';
import {NavigationEnd, Router} from '@angular/router';
-
@Component({
selector: 'app-tweet-list',
templateUrl: './tweet-list.component.html',