Skip to content

Commit

Permalink
Drop styled link text (#16042)
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex authored Dec 5, 2019
1 parent 6d3ed8a commit 2e9bf90
Show file tree
Hide file tree
Showing 49 changed files with 141 additions and 141 deletions.
26 changes: 13 additions & 13 deletions aspnetcore/blazor/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The following `ParentComponent` can provide content for rendering the `ChildComp

## Attribute splatting and arbitrary parameters

Components can capture and render additional attributes in addition to the component's declared parameters. Additional attributes can be captured in a dictionary and then *splatted* onto an element when the component is rendered using the [@attributes](xref:mvc/views/razor#attributes) Razor directive. This scenario is useful when defining a component that produces a markup element that supports a variety of customizations. For example, it can be tedious to define attributes separately for an `<input>` that supports many parameters.
Components can capture and render additional attributes in addition to the component's declared parameters. Additional attributes can be captured in a dictionary and then *splatted* onto an element when the component is rendered using the [`@attributes`](xref:mvc/views/razor#attributes) Razor directive. This scenario is useful when defining a component that produces a markup element that supports a variety of customizations. For example, it can be tedious to define attributes separately for an `<input>` that supports many parameters.

In the following example, the first `<input>` element (`id="useIndividualParams"`) uses individual component parameters, while the second `<input>` element (`id="useAttributesDict"`) uses attribute splatting:

Expand Down Expand Up @@ -280,7 +280,7 @@ The rendered `<div>` in the `Parent` component contains `extra="10"` when passed

## Data binding

Data binding to both components and DOM elements is accomplished with the [@bind](xref:mvc/views/razor#bind) attribute. The following example binds a `CurrentValue` property to the text box's value:
Data binding to both components and DOM elements is accomplished with the [`@bind`](xref:mvc/views/razor#bind) attribute. The following example binds a `CurrentValue` property to the text box's value:

```cshtml
<input @bind="CurrentValue" />
Expand Down Expand Up @@ -308,7 +308,7 @@ Using `@bind` with the `CurrentValue` property (`<input @bind="CurrentValue" />`

When the component is rendered, the `value` of the input element comes from the `CurrentValue` property. When the user types in the text box and changes element focus, the `onchange` event is fired and the `CurrentValue` property is set to the changed value. In reality, the code generation is more complex because `@bind` handles cases where type conversions are performed. In principle, `@bind` associates the current value of an expression with a `value` attribute and handles changes using the registered handler.

In addition to handling `onchange` events with `@bind` syntax, a property or field can be bound using other events by specifying an [@bind-value](xref:mvc/views/razor#bind) attribute with an `event` parameter ([@bind-value:event](xref:mvc/views/razor#bind)). The following example binds the `CurrentValue` property for the `oninput` event:
In addition to handling `onchange` events with `@bind` syntax, a property or field can be bound using other events by specifying an [`@bind-value`](xref:mvc/views/razor#bind) attribute with an `event` parameter ([`@bind-value:event`](xref:mvc/views/razor#bind)). The following example binds the `CurrentValue` property for the `oninput` event:

```cshtml
<input @bind-value="CurrentValue" @bind-value:event="oninput" />
Expand Down Expand Up @@ -377,7 +377,7 @@ For information on how to set the user's culture, see the [Localization](#locali

**Format strings**

Data binding works with <xref:System.DateTime> format strings using [@bind:format](xref:mvc/views/razor#bind). Other format expressions, such as currency or number formats, aren't available at this time.
Data binding works with <xref:System.DateTime> format strings using [`@bind:format`](xref:mvc/views/razor#bind). Other format expressions, such as currency or number formats, aren't available at this time.

```cshtml
<input @bind="StartDate" @bind:format="yyyy-MM-dd" />
Expand Down Expand Up @@ -491,7 +491,7 @@ In general, a property can be bound to a corresponding event handler using `@bin

## Event handling

Razor components provide event handling features. For an HTML element attribute named `on{EVENT}` (for example, `onclick` and `onsubmit`) with a delegate-typed value, Razor components treats the attribute's value as an event handler. The attribute's name is always formatted [@on{EVENT}](xref:mvc/views/razor#onevent).
Razor components provide event handling features. For an HTML element attribute named `on{EVENT}` (for example, `onclick` and `onsubmit`) with a delegate-typed value, Razor components treats the attribute's value as an event handler. The attribute's name is always formatted [`@on{EVENT}`](xref:mvc/views/razor#onevent).

The following code calls the `UpdateHeading` method when the button is selected in the UI:

Expand Down Expand Up @@ -644,7 +644,7 @@ Prefer the strongly typed `EventCallback<T>` over `EventCallback`. `EventCallbac

### Prevent default actions

Use the [@on{EVENT}:preventDefault](xref:mvc/views/razor#oneventpreventdefault) directive attribute to prevent the default action for an event.
Use the [`@on{EVENT}:preventDefault`](xref:mvc/views/razor#oneventpreventdefault) directive attribute to prevent the default action for an event.

When a key is selected on an input device and the element focus is on a text box, a browser normally displays the key's character in the text box. In the following example, the default behavior is prevented by specifying the `@onkeypress:preventDefault` directive attribute. The counter increments, and the **+** key isn't captured into the `<input>` element's value:

Expand Down Expand Up @@ -676,7 +676,7 @@ An event handler isn't required to prevent the default action. The event handler

### Stop event propagation

Use the [@on{EVENT}:stopPropagation](xref:mvc/views/razor#oneventstoppropagation) directive attribute to stop event propagation.
Use the [`@on{EVENT}:stopPropagation`](xref:mvc/views/razor#oneventstoppropagation) directive attribute to stop event propagation.

In the following example, selecting the check box prevents click events from the second child `<div>` from propagating to the parent `<div>`:

Expand Down Expand Up @@ -834,7 +834,7 @@ Password:

Component references provide a way to reference a component instance so that you can issue commands to that instance, such as `Show` or `Reset`. To capture a component reference:

* Add an [@ref](xref:mvc/views/razor#ref) attribute to the child component.
* Add an [`@ref`](xref:mvc/views/razor#ref) attribute to the child component.
* Define a field with the same type as the child component.

```cshtml
Expand Down Expand Up @@ -1019,7 +1019,7 @@ Optional parameters aren't supported, so two `@page` directives are applied in t

Razor components are generated as partial classes. Razor components are authored using either of the following approaches:

* C# code is defined in an [@code](xref:mvc/views/razor#code) block with HTML markup and Razor code in a single file. Blazor templates define their Razor components using this approach.
* C# code is defined in an [`@code`](xref:mvc/views/razor#code) block with HTML markup and Razor code in a single file. Blazor templates define their Razor components using this approach.
* C# code is placed in a code-behind file defined as a partial class.

The following example shows the default `Counter` component with an `@code` block in an app generated from a Blazor template. HTML markup, Razor code, and C# code are in the same file:
Expand Down Expand Up @@ -1118,13 +1118,13 @@ The base class should derive from `ComponentBase`.

The namespace of a component authored with Razor is based on (in priority order):

* [@namespace](xref:mvc/views/razor#namespace) designation in Razor file (*.razor*) markup (`@namespace BlazorSample.MyNamespace`).
* [`@namespace`](xref:mvc/views/razor#namespace) designation in Razor file (*.razor*) markup (`@namespace BlazorSample.MyNamespace`).
* The project's `RootNamespace` in the project file (`<RootNamespace>BlazorSample</RootNamespace>`).
* The project name, taken from the project file's file name (*.csproj*), and the path from the project root to the component. For example, the framework resolves *{PROJECT ROOT}/Pages/Index.razor* (*BlazorSample.csproj*) to the namespace `BlazorSample.Pages`. Components follow C# name binding rules. For the `Index` component in this example, the components in scope are all of the components:
* In the same folder, *Pages*.
* The components in the project's root that don't explicitly specify a different namespace.

Components defined in a different namespace are brought into scope using Razor's [@using](xref:mvc/views/razor#using) directive.
Components defined in a different namespace are brought into scope using Razor's [`@using`](xref:mvc/views/razor#using) directive.

If another component, `NavMenu.razor`, exists in the *BlazorSample/Shared/* folder, the component can be used in `Index.razor` with the following `@using` statement:

Expand All @@ -1136,7 +1136,7 @@ This is the Index page.
<NavMenu></NavMenu>
```

Components can also be referenced using their fully qualified names, which doesn't require the [@using](xref:mvc/views/razor#using) directive:
Components can also be referenced using their fully qualified names, which doesn't require the [`@using`](xref:mvc/views/razor#using) directive:

```cshtml
This is the Index page.
Expand Down Expand Up @@ -1265,7 +1265,7 @@ Alternatively, you can specify the `Context` attribute on the component element.

### Generic-typed components

Templated components are often generically typed. For example, a generic `ListViewTemplate` component can be used to render `IEnumerable<T>` values. To define a generic component, use the [@typeparam](xref:mvc/views/razor#typeparam) directive to specify type parameters:
Templated components are often generically typed. For example, a generic `ListViewTemplate` component can be used to render `IEnumerable<T>` values. To define a generic component, use the [`@typeparam`](xref:mvc/views/razor#typeparam) directive to specify type parameters:

[!code-cshtml[](common/samples/3.x/BlazorWebAssemblySample/Components/ListViewTemplate.razor)]

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/blazor/handle-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The preceding unhandled exceptions are described in the following sections of th
When Blazor creates an instance of a component:

* The component's constructor is invoked.
* The constructors of any non-singleton DI services supplied to the component's constructor via the [@inject](xref:blazor/dependency-injection#request-a-service-in-a-component) directive or the [[Inject]](xref:blazor/dependency-injection#request-a-service-in-a-component) attribute are invoked.
* The constructors of any non-singleton DI services supplied to the component's constructor via the [`@inject`](xref:blazor/dependency-injection#request-a-service-in-a-component) directive or the [`[Inject]`](xref:blazor/dependency-injection#request-a-service-in-a-component) attribute are invoked.

A circuit fails when any executed constructor or a setter for any `[Inject]` property throws an unhandled exception. The exception is fatal because the framework can't instantiate the component. If constructor logic may throw exceptions, the app should trap the exceptions using a [try-catch](/dotnet/csharp/language-reference/keywords/try-catch) statement with error handling and logging.

Expand Down Expand Up @@ -177,7 +177,7 @@ The following conditions apply to error handling with `InvokeAsync<T>`:
* If a call to `InvokeAsync<T>` fails asynchronously, the .NET <xref:System.Threading.Tasks.Task> fails. A call to `InvokeAsync<T>` may fail, for example, because the JavaScript-side code throws an exception or returns a `Promise` that completed as `rejected`. Developer code must catch the exception. If using the [await](/dotnet/csharp/language-reference/keywords/await) operator, consider wrapping the method call in a [try-catch](/dotnet/csharp/language-reference/keywords/try-catch) statement with error handling and logging. Otherwise, the failing code results in an unhandled exception that's fatal to the circuit.
* By default, calls to `InvokeAsync<T>` must complete within a certain period or else the call times out. The default timeout period is one minute. The timeout protects the code against a loss in network connectivity or JavaScript code that never sends back a completion message. If the call times out, the resulting `Task` fails with an <xref:System.OperationCanceledException>. Trap and process the exception with logging.

Similarly, JavaScript code may initiate calls to .NET methods indicated by the [[JSInvokable] attribute](xref:blazor/javascript-interop#invoke-net-methods-from-javascript-functions). If these .NET methods throw an unhandled exception:
Similarly, JavaScript code may initiate calls to .NET methods indicated by the [`[JSInvokable]`](xref:blazor/javascript-interop#invoke-net-methods-from-javascript-functions) attribute. If these .NET methods throw an unhandled exception:

* The exception isn't treated as fatal to the circuit.
* The JavaScript-side `Promise` is rejected.
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ To install the `Microsoft.AspNetCore.ProtectedBrowserStorage` package:

### Save and load data within a component

In any component that requires loading or saving data to browser storage, use [@inject](xref:blazor/dependency-injection#request-a-service-in-a-component) to inject an instance of either of the following:
In any component that requires loading or saving data to browser storage, use [`@inject`](xref:blazor/dependency-injection#request-a-service-in-a-component) to inject an instance of either of the following:

* `ProtectedLocalStorage`
* `ProtectedSessionStorage`
Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/blazor/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following files and folders make up a Blazor app generated from a Blazor tem

* *App.razor* &ndash; The root component of the app that sets up client-side routing using the <xref:Microsoft.AspNetCore.Components.Routing.Router> component. The `Router` component intercepts browser navigation and renders the page that matches the requested address.

* *Pages* folder &ndash; Contains the routable components/pages (*.razor*) that make up the Blazor app. The route for each page is specified using the [@page](xref:mvc/views/razor#page) directive. The template includes the following components:
* *Pages* folder &ndash; Contains the routable components/pages (*.razor*) that make up the Blazor app. The route for each page is specified using the [`@page`](xref:mvc/views/razor#page) directive. The template includes the following components:
* `Index` (*Index.razor*) &ndash; Implements the Home page.
* `Counter` (*Counter.razor*) &ndash; Implements the Counter page.
* `Error` (*Error.razor*, Blazor Server app only) &ndash; Rendered when an unhandled exception occurs in the app.
Expand All @@ -63,7 +63,7 @@ The following files and folders make up a Blazor app generated from a Blazor tem
* `MainLayout` (*MainLayout.razor*) &ndash; The app's layout component.
* `NavMenu` (*NavMenu.razor*) &ndash; Implements sidebar navigation. Includes the [NavLink component](xref:blazor/routing#navlink-component) (<xref:Microsoft.AspNetCore.Components.Routing.NavLink>), which renders navigation links to other Razor components. The `NavLink` component automatically indicates a selected state when its component is loaded, which helps the user understand which component is currently displayed.

* *_Imports.razor* &ndash; Includes common Razor directives to include in the app's components (*.razor*), such as [@using](xref:mvc/views/razor#using) directives for namespaces.
* *_Imports.razor* &ndash; Includes common Razor directives to include in the app's components (*.razor*), such as [`@using`](xref:mvc/views/razor#using) directives for namespaces.

* *Data* folder (Blazor Server) &ndash; Contains the `WeatherForecast` class and implementation of the `WeatherForecastService` that provide example weather data to the app's `FetchData` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ Editor preferences are available in the [editor config](https://github.com/twbs/

Get updates on Bootstrap's development and chat with the project maintainers and community members.

* Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
* Follow [`@getbootstrap` on Twitter](https://twitter.com/getbootstrap).
* Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
* Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
* Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
* Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
* Implementation help may be found at Stack Overflow (tagged [twitter-bootstrap-3](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
* Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.


Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/fundamentals/configuration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Options injection is demonstrated as Example &num;4 in the sample app.
Inject <xref:Microsoft.Extensions.Options.IOptionsMonitor%601> into:
* A Razor page or MVC view with the [@inject](xref:mvc/views/razor#inject) Razor directive.
* A Razor page or MVC view with the [`@inject`](xref:mvc/views/razor#inject) Razor directive.
* A page or view model.
The following example from the sample app injects <xref:Microsoft.Extensions.Options.IOptionsMonitor%601> into a page model (*Pages/Index.cshtml.cs*):
Expand Down Expand Up @@ -586,7 +586,7 @@ Options injection is demonstrated as Example &num;4 in the sample app.
Inject <xref:Microsoft.Extensions.Options.IOptionsMonitor%601> into:
* A Razor page or MVC view with the [@inject](xref:mvc/views/razor#inject) Razor directive.
* A Razor page or MVC view with the [`@inject`](xref:mvc/views/razor#inject) Razor directive.
* A page or view model.
The following example from the sample app injects <xref:Microsoft.Extensions.Options.IOptionsMonitor%601> into a page model (*Pages/Index.cshtml.cs*):
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/fundamentals/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The endpoint that processes the error can get the original URL that generated th

## Disable status code pages

To disable status code pages for an MVC controller or action method, use the [[SkipStatusCodePages]](xref:Microsoft.AspNetCore.Mvc.SkipStatusCodePagesAttribute) attribute.
To disable status code pages for an MVC controller or action method, use the [`[SkipStatusCodePages]`](xref:Microsoft.AspNetCore.Mvc.SkipStatusCodePagesAttribute) attribute.

To disable status code pages for specific requests in a Razor Pages handler method or in an MVC controller, use <xref:Microsoft.AspNetCore.Diagnostics.IStatusCodePagesFeature>:

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/fundamentals/startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how the Startup class in ASP.NET Core configures services and
monikerRange: '>= aspnetcore-2.1'
ms.author: riande
ms.custom: mvc
ms.date: 11/02/2019
ms.date: 12/05/2019
uid: fundamentals/startup
---
# App startup in ASP.NET Core
Expand Down Expand Up @@ -37,7 +37,7 @@ The preceding sample is for [Razor Pages](xref:razor-pages/index); the MVC versi

::: moniker-end

The `Startup` class is specified when the app's [host](xref:fundamentals/index#host) is built. The `Startup` class is typically specified by calling the [`WebHostBuilderExtensions.UseStartup<TStartup>`](xref:Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStartup*) method on the host builder:
The `Startup` class is specified when the app's [host](xref:fundamentals/index#host) is built. The `Startup` class is typically specified by calling the [WebHostBuilderExtensions.UseStartup\<TStartup>](xref:Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStartup*) method on the host builder:

::: moniker range="< aspnetcore-3.0"

Expand Down
Loading

0 comments on commit 2e9bf90

Please # to comment.