import { Router } from ‘@angular/router‘; constructor( private router:Router, ) { } goApplicationDetail(instanceId:number,ownerShip:boolean){ return this.router.navigate([‘/console/details/appDetail‘,{"instanceId":instanceId,"ownerShip":ownerShip}]); }
import {ActivatedRoute } from ‘@angular/router‘; constructor( private route:ActivatedRoute ) { this.appId = this.route.params["value"].instanceId; this.tempOwnerShip = this.route.params["value"].ownerShip; this.tempOwnerShip==="true"?this.ownerShip =true:this.ownerShip =false; console.log("appid="+this.appId); console.log("ownerShip="+this.ownerShip); }
原文地址:https://www.cnblogs.com/eedc/p/9742836.html
时间: 2024-10-07 23:42:41