import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';

import * as $ from 'jquery';

declare const window: any;
@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {
  constructor(
    private router: Router,
    private route: ActivatedRoute
  ) { 
 
    

    $(window).scroll(function(){

      var custom = $('.navbar'),
      
      scroll = $(window).scrollTop();
      if(scroll > 1) custom.addClass("nav_color");
      
      else custom.removeClass("nav_color");
      
      });
  }

  ngOnInit() {
  }

  goToPage(path,data=null){
    this.router.navigateByUrl(path,{queryParams:data});
    }
}
