Advertisement
whitestarrr

Untitled

Nov 18th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <div class="container body-content">
  2. <div class="well">
  3. <h2>All Categories -
  4. <a href="/admin/category/create" class="btn btnwarning">Create
  5. New</a>
  6. </h2>
  7. <div class="row">
  8. <table class="table table-striped table-hover ">
  9. <thead>
  10. <tr>
  11. <th>#</th>
  12. <th>Name</th>
  13. <th>Actions</th>
  14. </tr>
  15. © Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA
  16. license.
  17.  
  18. Follow us: Page 68 of 93
  19. What we have to do is add the routing:
  20. However, we don’t have our category controller, go and require it in “admin.js” file”:
  21. Now, back to the “route.js”:
  22. Let's start it and see how it looks:
  23. Pretty standard, but it will do the job. Next step – Creating categories.
  24. </thead>
  25. <tbody>
  26. {{#each categories}}
  27. <tr>
  28. <td>{{ this.id }}</td>
  29. <td>{{ this.name }}</td>
  30. <td>
  31. <a
  32. href="/admin/category/edit/{{this.id}}">Edit</a>
  33. <a
  34. href="/admin/category/delete/{{this.id}}">Delete</a>
  35. </td>
  36. </tr>
  37. {{/each}}
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement