angular - How to change param in url before ? on click? -
i have multiple tabs , on load have url:
http://localhost:8080/test/local/evident/1248/161/1?procesid=12 changing tabs on using class show , hide. use index goes 0 10. need when user click on tab find number before ? , change because change tab, when refresh page stay on tab clicked. suggestion how can that. have index number need pass in url change number before ?procesid, in case number 1.
im using method set active index:
activate(index: any) { this.active = index; this.confing[this.active]['disabled'] = false this.selected = this.confing[this.active]; }
you can change url on tab click doing following:
router.navigatebyurl(myapiurl+"/"+tabid+"?"+itemid, { skiplocationchange: true }); and pay attention include necessary "/","=","?", etc
Comments
Post a Comment