public override void Process(TagHelperContext context, TagHelperOutput output) { output.TagName = "script"; var scriptContent = string.Format("window.baseUrl = '{0}';", _pathProvider.GetAppBaseUrl()); output.Content.SetHtmlContent(scriptContent); }
public IActionResult Index() { return(View(new { baseUrl = _pathProvider.GetAppBaseUrl(), isAuthenticated = User.Identity.IsAuthenticated })); }