import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';
import { WebService } from './../../providers/web.service';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {

  constructor(private router: Router, private route: ActivatedRoute, public service: WebService) { }

  ngOnInit() {
  }
  goToPage(path: any, data = null) {
    console.log(data);
    this.router.navigateByUrl(path, {queryParams: data});
    document.body.scrollTop = document.documentElement.scrollTop = 0;
  }

  clickForex() {
    this.router.navigate(['/maker/forex']);
  }

  clickDelivery() {
    this.router.navigate(['/maker/delivery']);
  }

  logout() {
    this.service.logout();
  }
}
