public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            output.TagName = "script";
            var scriptContent = string.Format("window.baseUrl = '{0}';", _pathProvider.GetAppBaseUrl());

            output.Content.SetHtmlContent(scriptContent);
        }
示例#2
0
 public IActionResult Index()
 {
     return(View(new
     {
         baseUrl = _pathProvider.GetAppBaseUrl(),
         isAuthenticated = User.Identity.IsAuthenticated
     }));
 }