nav-tabs.component.ts 626 B

123456789101112131415161718192021222324252627
  1. import { Component } from '@angular/core';
  2. import { ActivatedRoute, Router } from '@angular/router';
  3. @Component({
  4. selector: 'app-nav-tabs',
  5. templateUrl: './nav-tabs.component.html',
  6. styleUrls: ['./nav-tabs.component.scss']
  7. })
  8. export class NavTabsComponent {
  9. path = ""
  10. constructor(private route:ActivatedRoute,private router:Router){
  11. this.route.queryParams.subscribe(params=>{
  12. this.path = location.pathname;
  13. })
  14. }
  15. // goTab(path:string){
  16. // this.path = path;
  17. // location.href = path;
  18. // // this.router.navigate([path])
  19. // }
  20. goBack() {
  21. this.router.navigate(['/ai']);
  22. }
  23. }