【发布时间】:2017-05-04 19:07:14
【问题描述】:
我是 Angular 和 Node JS 的新手,我目前正在开发一个应用程序,在决定如何在我的不同组件之间进行最佳导航时,我遇到了一些问题。
Users are able to add the name of a user, and add books associated to that user
单击书名后,我希望导航到与该书关联的组件,并专门提取该条目的信息,例如 cmets。
Component that will render specific book information
使用 Angular 2(MEAN 堆栈),我想了解我应该如何解决这样的问题 - 我是否应该存储任何特定值以便更轻松地导航和从数据库中提取有关图书的信息。
<article class="panel panel-default">
<div class="panel-body">
<div class="author">
{{ author.fullName }}
</div>
<div class="addbook">
<book-input [author]='author'></book-input>
</div>
</div>
<footer class="panel-footer">
<div>
<ul *ngFor="let book of author.books">
<li><a [routerLink]="['book']">{{ book }}</a></li>
</ul>
</div>
</footer>
</article>
任何建议将不胜感激
【问题讨论】:
-
我看不到你的截图链接,上面写着
503error -
谢谢你的邮件,奇怪 - 我已经重新上传了
-
请尽量不要在同一个问题中同时标记 Angular 和 Angularjs;尽管它们的名称明显令人困惑,但它们是完全不同的框架。
标签: javascript angular routes angular-ui-router