我的網址是這樣的:網址到右路線描述
/#/administration/counters/1
我怎樣才能獲得路線描述陣營的組成部分。此URL正確路線的描述是:
/administration/counters/:counterId
感謝您的幫助。
我的網址是這樣的:網址到右路線描述
/#/administration/counters/1
我怎樣才能獲得路線描述陣營的組成部分。此URL正確路線的描述是:
/administration/counters/:counterId
感謝您的幫助。
您可以使用this.props.params.counterId
此參數在您的路由組件中可用,默認情況下,您的孩子沒有此參數。
我需要確切的URL說明這是在這種情況下
/administration/counters/:counterId
您可以使用this.props.location.pathname在任何組件來獲得當前的路徑名。 –
它給了我當前的網址我需要實際的路線descriptiom:counterId – kraizybone