|
@@ -1,6 +1,6 @@
|
|
import { CommonModule } from '@angular/common';
|
|
import { CommonModule } from '@angular/common';
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
-import { RouterModule } from '@angular/router';
|
|
|
|
|
|
+import { ActivatedRoute, RouterModule } from '@angular/router';
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-nav-mobile-tabs',
|
|
selector: 'app-nav-mobile-tabs',
|
|
@@ -17,4 +17,16 @@ export class NavMobileTabs {
|
|
{ path:"/menu/reserve",icon: 'fas fa-search', text: '发现' },
|
|
{ path:"/menu/reserve",icon: 'fas fa-search', text: '发现' },
|
|
{ path:"/menu/mine",icon: 'fas fa-user', text: '我的', active: true }
|
|
{ path:"/menu/mine",icon: 'fas fa-user', text: '我的', active: true }
|
|
];
|
|
];
|
|
|
|
+ currentPath:string = ""
|
|
|
|
+ goPath(nav:any){
|
|
|
|
+ this.currentPath = nav.path
|
|
|
|
+ }
|
|
|
|
+ constructor(
|
|
|
|
+ private route:ActivatedRoute
|
|
|
|
+ ){
|
|
|
|
+ this.route.params.subscribe(data=>{
|
|
|
|
+ // console.log(this.currentPath,location.pathname)
|
|
|
|
+ // this.currentPath = location.pathname
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|