AppTagHelperOptions Class
Definition
- Namespace
- Cuemon.AspNetCore.Razor.TagHelpers
- Assemblies
- Cuemon.AspNetCore.Razor.TagHelpers.dll
Configuration options for AppImageTagHelper, AppLinkTagHelper and AppScriptTagHelper.
public class AppTagHelperOptions : TagHelperOptions, IParameterObject
- Inheritance
-
AppTagHelperOptions
- Implements
- Inherited Members
Examples
The following example demonstrates how to configure to customize the base URL and URI scheme for application-scoped tag helpers.
using Cuemon.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace MyApp.Examples;
public class AppTagHelperOptionsExample
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.Configure<AppTagHelperOptions>(o =>
{
o.Scheme = ProtocolUriScheme.Https;
o.BaseUrl = "static.example.com";
});
var app = builder.Build();
app.Run();
}
}
Constructors
| Name | Description |
|---|---|
| AppTagHelperOptions() | Initializes a new instance of the AppTagHelperOptions class. |