how to use jquery in angular component code example

Example 1: declare * angular jquery

declare var $:any;

Example 2: angular navigate using component

import {Router} from '@angular/router'; // import router from angular router

export class Component{ 				// Example component.. 
	constructor(private route:Router){} 
  
  	go(){
		this.route.navigate(['/page']); // navigate to other page
	}
}

Example 3: add jquery angular

../node_modules/jquery/dist/jquery.min.js

Example 4: generate new component angular

ng generate <schematic> [options]