我无法在网址中获取ID

时间:2018-07-30 11:31:52

标签: angular angular-ui-router

我通过这种方法获取ID。

 this.router.routerState.root.queryParams.subscribe( params =>{
  this.branch_id = +params['id'];}))

网址:http://localhost:4200/profileresult/2

1 个答案:

答案 0 :(得分:0)

您需要使用For CounterTxt = 1 To textLngt chaseEnd = chaseEnd + 1 For CounterChase = chaseBeg To chaseEnd - 1 Step -1 ' reduces the chase length by 1 after each repition Worksheets("Sheet1").Cells(7, CounterChase + 1).Value = "" ' deleats previous chase position while running. Worksheets("Sheet1").Cells(7, CounterChase).Value = Mid(MyText, CounterTxt, 1) Sleep 1 / 2 '1 millisecond pause Next CounterChase Next CounterTxt

内部构造函数:

ActivatedRoute

constructor(private route: ActivatedRoute); 方法中:

OnInit