diff --git a/source/blazor-university-com/input/pages/components/code-generated-html-attributes/index.md b/source/blazor-university-com/input/pages/components/code-generated-html-attributes/index.md index 9af3989..1bf93b4 100644 --- a/source/blazor-university-com/input/pages/components/code-generated-html-attributes/index.md +++ b/source/blazor-university-com/input/pages/components/code-generated-html-attributes/index.md @@ -60,7 +60,7 @@ Razor will only execute C# code in the following places: 3. Within the `@code` section. The technique we need to employ to generate one or more attributes + values for a HTML element is called "Attribute splatting". -Attribute splatting involves assigning a `Dictionary` to an attribute with the special name `@attribute`. +Attribute splatting involves assigning a `Dictionary` to an attribute with the special name `@attributes`. ```razor
diff --git a/source/blazor-university-com/input/pages/components/replacing-attributes-on-child-components/index.md b/source/blazor-university-com/input/pages/components/replacing-attributes-on-child-components/index.md index 1cb3350..a0b6f0f 100644 --- a/source/blazor-university-com/input/pages/components/replacing-attributes-on-child-components/index.md +++ b/source/blazor-university-com/input/pages/components/replacing-attributes-on-child-components/index.md @@ -137,7 +137,7 @@ then adjusting the position of `@attributes=` in our `ChildComponent` will give
``` ## R.I.P. default values diff --git a/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/singleton-dependencies/index.md b/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/singleton-dependencies/index.md index 2d58945..0e43bd0 100644 --- a/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/singleton-dependencies/index.md +++ b/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/singleton-dependencies/index.md @@ -31,7 +31,7 @@ public interface IChatService ``` To implement this service we'll use a `List` to store the chat history, -and remove messages from the start of the list whenever there are more than 100 in the queue. +and remove messages from the start of the list whenever there are more than 50 in the queue. We'll use the `lock()` statement to ensure thread safety. ```razor {: .line-numbers} diff --git a/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/transient-dependencies/index.md b/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/transient-dependencies/index.md index b33d89a..047213f 100644 --- a/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/transient-dependencies/index.md +++ b/source/blazor-university-com/input/pages/dependency-injection/dependency-lifetimes-and-scopes/transient-dependencies/index.md @@ -31,7 +31,7 @@ public interface IMyTransientService To implement this interface we'll write a class with a `static` integer field that we can use to determine the next available sequence number. -This field will be marked as `[volatile](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/volatile)` +This field will be marked as [`volatile`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/volatile) and altered using `System.Threading.Interlocked.Increment` so we can modify the field across multiple threads without having to do any thread locking. diff --git a/source/blazor-university-com/input/pages/forms/validation/index.md b/source/blazor-university-com/input/pages/forms/validation/index.md index 23cdce7..38ff25a 100644 --- a/source/blazor-university-com/input/pages/forms/validation/index.md +++ b/source/blazor-university-com/input/pages/forms/validation/index.md @@ -7,7 +7,7 @@ order: 3 [![](images/SourceLink.png)](https://github.com/mrpmorris/blazor-university/tree/master/src/Forms/ValidatingUserInput) The `DataAnnotationsValidator` is the standard validator type in Blazor. -Adding this component within an `EditForm` component will enable form validation based on .NET attributes descended +Adding this component within an `EditForm` component will enable form validation based on .NET attributes descended from `System.ComponentModel.DataAnnotations.ValidationAttribute`. First we'll create a short example, then we'll go through what happens behind the scenes. @@ -133,4 +133,4 @@ whereas the razor expression makes it more obvious to other developers that we a } ``` -[![](images/ValidationSummaryAndValidationMessages.png)](http://blazor-university.com/wp-content/uploads/2019/08/ValidationSummaryAndValidationMessages.png) +[![](images/ValidationSummaryAndValidationMessages.png)](images/ValidationSummaryAndValidationMessages.png) diff --git a/source/blazor-university-com/input/pages/javascript-interop/calling-javascript-from-dotnet/passing-html-element-references/index.md b/source/blazor-university-com/input/pages/javascript-interop/calling-javascript-from-dotnet/passing-html-element-references/index.md index 60fcd60..861689d 100644 --- a/source/blazor-university-com/input/pages/javascript-interop/calling-javascript-from-dotnet/passing-html-element-references/index.md +++ b/source/blazor-university-com/input/pages/javascript-interop/calling-javascript-from-dotnet/passing-html-element-references/index.md @@ -66,7 +66,9 @@ This is the problem we will solve using JavaScript Interop, `@ref`, and `Element - First create a new Blazor application. - In each of the pages replace the content with the same mark-up just below each `@page` directive. +```html Enter your name: +``` Run the application and observe how the `` element does not automatically gain focus, not even on first page load. diff --git a/source/blazor-university-com/input/pages/layouts/creating-a-blazor-layout/index.md b/source/blazor-university-com/input/pages/layouts/creating-a-blazor-layout/index.md index df5d68f..85e85e6 100644 --- a/source/blazor-university-com/input/pages/layouts/creating-a-blazor-layout/index.md +++ b/source/blazor-university-com/input/pages/layouts/creating-a-blazor-layout/index.md @@ -32,4 +32,4 @@ Blazor layouts work only within the part of the HTML that Blazor is defined with in a default Blazor application this is everything within the `` element. It isn't currently possible to alter attributes of HTML elements outside of this scope except by use of [JavaScript Interop](http://blazor-university.com/javascript-interop/). -[![](images/Layout.png)](http://blazor-university.com/wp-content/uploads/2019/06/image.png) +[![](images/Layout.png)](images/Layout.png) diff --git a/source/blazor-university-com/input/pages/overview/what-is-blazor/index.md b/source/blazor-university-com/input/pages/overview/what-is-blazor/index.md index 92049c5..029f141 100644 --- a/source/blazor-university-com/input/pages/overview/what-is-blazor/index.md +++ b/source/blazor-university-com/input/pages/overview/what-is-blazor/index.md @@ -9,7 +9,7 @@ The name Blazor is a combination/mutation of the words Browser and Razor (the .N The implication being that instead of having to execute Razor views on the server in order to present HTML to the browser, Blazor is capable of executing these views on the client. -[![Blazor client side](images/BlazorClientSide-300x251.png)](http://blazor-university.com/wp-content/uploads/2019/05/BlazorClientSide.png) +[![Blazor client side](images/BlazorClientSide-300x251.png)](images/BlazorClientSide-300x251.png) Blazor app with client-side execution diff --git a/source/blazor-university-com/input/pages/templating-components-with-renderfragements/using-typeparam-to-create-generic-components/index.md b/source/blazor-university-com/input/pages/templating-components-with-renderfragements/using-typeparam-to-create-generic-components/index.md index 9315713..ad12fab 100644 --- a/source/blazor-university-com/input/pages/templating-components-with-renderfragements/using-typeparam-to-create-generic-components/index.md +++ b/source/blazor-university-com/input/pages/templating-components-with-renderfragements/using-typeparam-to-create-generic-components/index.md @@ -29,11 +29,13 @@ We'll also add a `[Parameter]` property, expecting an `IEnumerable`. [Parameter] public IEnumerable Data { get; set; } } +``` ## Using the generic component Create a `Person` class with three properties. +```cs public class Person { public string Salutation { get; set; }