Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container body-content">
- <div class="well">
- <h2>All Categories -
- <a href="/admin/category/create" class="btn btnwarning">Create
- New</a>
- </h2>
- <div class="row">
- <table class="table table-striped table-hover ">
- <thead>
- <tr>
- <th>#</th>
- <th>Name</th>
- <th>Actions</th>
- </tr>
- © Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA
- license.
- Follow us: Page 68 of 93
- What we have to do is add the routing:
- However, we don’t have our category controller, go and require it in “admin.js” file”:
- Now, back to the “route.js”:
- Let's start it and see how it looks:
- Pretty standard, but it will do the job. Next step – Creating categories.
- </thead>
- <tbody>
- {{#each categories}}
- <tr>
- <td>{{ this.id }}</td>
- <td>{{ this.name }}</td>
- <td>
- <a
- href="/admin/category/edit/{{this.id}}">Edit</a>
- <a
- href="/admin/category/delete/{{this.id}}">Delete</a>
- </td>
- </tr>
- {{/each}}
- </tbody>
- </table>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement