【发布时间】:2017-02-09 10:18:50
【问题描述】:
下面是我的路由代码。我可以从显示列表路由到信息列表,并且在信息列表中我从数据库中获取所有数据,但我想根据他们的 ID 或其他内容显示一个学生的显示数据。我现在应该怎么做? 并且每次我需要显示不同的学生详细信息。
这是我的路由器。
<Router history={hashHistory}>
<Route path="/" component={App}/>
<Route path="/students" component={Students}/>
<Route path="/holidays" component={Calender}/>
<Route path="/premontessori" component={Premontessori}/>
<Route path="/createstudent" component={Createstudent}/>
<Route path="/montessori1" component={Montessori1}/>
<Route path="/montessori2" component={Montessori2}/>
<Route path="/displaylist" component={Displaylist}/>
<Route path="/information" component={Information}/>
</Router>, document.getElementById('app'));
这是我从显示列表到信息列表的链接
<Link to="/information" style={{textDecoration:'none'}} >
【问题讨论】:
标签: javascript node.js mongodb reactjs