From 1b2c44eb8397821df866a0e281ddfc1833262d43 Mon Sep 17 00:00:00 2001 From: Mathieu Sanchez Date: Wed, 12 Jun 2019 22:25:20 +0900 Subject: [PATCH] Replace space by + --- src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index de93e8e..cd1ae4f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -20,7 +20,7 @@ export class AppComponent { if ( this.searchInput.length > 0 ) { this.displayOverlay = true; - this.http.get( environment.baseUrl + this.searchInput ).subscribe( ( data: [{ url: string, tfidf: string }] ) => { + this.http.get( environment.baseUrl + this.searchInput.replace( ' ', '+' ) ).subscribe( ( data: [ { url: string, tfidf: string } ] ) => { this.results = data; this.results.sort( ( f, s ) => { if ( parseFloat( f.tfidf ) > parseFloat( s.tfidf ) ) {