2016-10-06 21 views
0

を使用してディープリンクを追加します。 /gateways/:id/gateways/:id/devices/gateways/:id/accesspointsへのリンクを持つサイドメニューがあり、さらに最後の2つにはLinkとして/gateways/:id/devices/:id/gateways/:id/accesspoints/:idを使用して、個々のデバイスとアクセスポイントへのリンクがあります。私はは、ルート設定の下に使用反応ルータを

<Link to="/gateways/${this.props.params.id}/accesspoints">Access Points</Link> 

OR

<Link to="/accesspoints">Access Points</Link> 

とサイドメニュー内のリンクを与えているとき、私は正しいページを取得しておりません。デバイスのリンクも同じです。私はブレッドクラムと一緒に以下のAPIを達成しようとしています。

home/gateways/GW_ID1/dashboard 
home/gateways/GW_ID1/accesspoints 
home/gateways/GW_ID1/accesspoints/GW_AP1 
home/gateways/GW_ID1/devices 
home/gateways/GW_ID1/devices/GW_DV1 

リンクする正しい方法は何ですか。ハンドラを使用していません。ブレーンストーミングのビットの後

答えて

0

は、私が

<Route name=":gid" path="/gateways/:gid"> 
     <Route name="Dashboard" path="/gateways/:gid/dashboard" component={ViewGateWay}/>          
     <Route name="Access Points" path="/gateways/:gid/accesspoints" component={AccessPoints}>        
      <Route name=":apid" path="/gateways/:gid/accesspoints/:apid" component={ViewAccessPoint}/> 
     </Route> 
     <Route name="Devices" path="/gateways/:gid/devices" component={Devices}>        
       <Route name=":did" path="/gateways/:gid/devices/:did" component={ViewDevice}/> 
     </Route> 
</Route> 
を達成するために何を望むか解決策を考え出しました
関連する問題