From bddab65ae58e347693b777cccf791201fdbcff4d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 Jul 2016 15:39:10 +0200 Subject: Client: save page params as well --- client/src/app/app.component.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'client/src/app/app.component.ts') diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 88b181f9c..354d00a7a 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,12 +1,11 @@ import { Component } from '@angular/core'; import { HTTP_PROVIDERS } from '@angular/http'; -import { Router, ROUTER_DIRECTIVES } from '@angular/router'; +import { ActivatedRoute, Router, ROUTER_DIRECTIVES } from '@angular/router'; import { FriendService } from './friends'; import { AuthService, AuthStatus, - Search, SearchComponent, SearchService } from './shared'; @@ -27,6 +26,7 @@ export class AppComponent { constructor( private authService: AuthService, private friendService: FriendService, + private route: ActivatedRoute, private router: Router ) { this.isLoggedIn = this.authService.isLoggedIn(); @@ -40,19 +40,6 @@ export class AppComponent { ); } - onSearch(search: Search) { - if (search.value !== '') { - const params = { - field: search.field, - search: search.value - }; - - this.router.navigate(['/videos/list', params]); - } else { - this.router.navigate(['/videos/list']); - } - } - // FIXME logout() { // this._authService.logout(); -- cgit v1.2.3