Nucleus .Net Core CMS

TagHelpers.MergeScriptsTagHelper Class

Namespace: Nucleus.ViewFeatures.TagHelpers
Assembly: Nucleus.ViewFeatures.dll
Tag Helper used to merge multiple <script> tags into a single "merged" tag, which is handled by the MergedFileProvider. A single <MergeScripts> can wrap all of your script elements.

Remarks

The MergeScriptsTagHelper is implemented within the Nucleus shared _Layout Razor layout and wraps all javascript scripts, including any scripts that you add by using AddScript. Under normal circumstances, you should not need to use the MergeScriptsTagHelper in your code. There is no HtmlHelper equivalent for the MergeScriptsTagHelper.

Constructor

Nucleus.ViewFeatures.TagHelpers.MergeScriptsTagHelper Constructor

Nucleus.ViewFeatures.TagHelpers.MergeScriptsTagHelper (IOptions<ResourceFileOptions> options, ILogger<MergeScriptsTagHelper> Logger)
Constructor
Parameters
Name Type
options Microsoft.Extensions.Options.IOptions<Nucleus.Abstractions.Models.Configuration.ResourceFileOptions>
Logger Microsoft.Extensions.Logging.ILogger<Nucleus.ViewFeatures.TagHelpers.MergeScriptsTagHelper>

Properties

ViewContext Property

Provides access to view context.

Methods

ProcessAsync (TagHelperContext,TagHelperOutput) Method

ProcessAsync (TagHelperContext context, TagHelperOutput output)
Merge scripts