Beginning Azure Static Web Apps by Stacy Cashmore

Beginning Azure Static Web Apps by Stacy Cashmore

Author:Stacy Cashmore
Language: eng
Format: epub
ISBN: 9781484281468
Publisher: Apress


This makes our page available on the same URL as the summaries, with the id and author of the blog post being added to differentiate it. This also makes the id and author available to us in the code – we’ll get to that shortly.

Before that, we are going to inject our new service so that we can retrieve the blog posts.4.

Add the code from Code 7-27 under the @page directive.

@inject BlogPostService service

Code 7-27Injecting the BlogPostService

Now we can add the code to fetch the blog post. Whereas for the summaries we accessed the list of summaries directly from the service, for the blog post we are going to make a private variable for the blog post directly on the page.

We also check that the parameter we have is the correct one.5.

Add the code snippet from Code 7-28 under the @inject statement from Code 7-27.



Download



Copyright Disclaimer:
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.