Skip to content

Instantly share code, notes, and snippets.

@scottaddie
Last active December 31, 2015 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottaddie/4ffe09287228c22343df to your computer and use it in GitHub Desktop.
Save scottaddie/4ffe09287228c22343df to your computer and use it in GitHub Desktop.
Index action method in HomeController.cs
public IActionResult Index()
{
const string JAVASCRIPT_KEY = "js";
JObject json = WebpackHelper.GetWebpackAssetsJson(_applicationBasePath);
ViewBag.VendorScripts = json.SelectToken("vendor").Value<string>(JAVASCRIPT_KEY);
ViewBag.AppScripts = json.SelectToken("app").Value<string>(JAVASCRIPT_KEY);
return View();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment