Web Development with Blazor by Jimmy Engström
Author:Jimmy Engström
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2021-06-18T00:00:00+00:00
Run the project and navigate to /admin/tags.
Try to add, edit, and delete a tag as shown in Figure 6.2:
Figure 6.2 â The edit tag view
Now we only have two things left: we need ways to list and edit blog posts.
Listing and editing blog posts
Let's start with listing and editing blog posts:
Right-click on the Pages/Admin folder, select Add | Razor component, and name the component BlogPostList.razor.
At the top of the BlogPostList.razor file, replace <h3>BlogPostList</h3> with the following code:@page "/admin/blogposts"
@inject IMyBlogApi api
<a href="/admin/blogposts/new">New blog post</a>
<ul>
<Virtualize ItemsProvider="LoadPosts" Context="p">
<li>@p.PublishDate
<a href="/admin/blogposts/@p.Id">@p.Title</a>
</li>
</Virtualize>
</ul>
We added a page directive, injected our API, and listed the blog posts using the Virtualize component.
We also linked the posts to a URL with the Id instance of the blog post.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9373)
The Mikado Method by Ola Ellnestam Daniel Brolund(9307)
Dependency Injection in .NET by Mark Seemann(8859)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7402)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7116)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6249)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(5957)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5512)
Kotlin in Action by Dmitry Jemerov(4637)
Audition by Ryu Murakami(4099)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(3883)
Functional Programming in JavaScript by Mantyla Dan(3723)
Svelte with Test-Driven Development by Daniel Irvine(2893)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(2837)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2600)
Architecting Modern Java EE Applications: Designing lightweight, business-oriented enterprise applications in the age of cloud, containers, and Java EE 8 by Daschner Sebastian(2558)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(2507)
Test-Driven Development with PHP 8 by Rainier Sarabia(2490)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(2339)