import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {AppConfig} from '../config/app.config';

/**
 * @title Table with filtering
 */
@Component({
    templateUrl: 'search.component.html'
})

export class SearchComponent implements OnInit {
    currentUser: any;
    searchStr: string;

    constructor(private router: Router) {
    }

    ngOnInit() {
    }

    search(searchStr) {
        const item = {};
        (<any>item).searchStr = searchStr;
        this.router.navigate([AppConfig.routes.products, item]);
    }

}
