get bundle url and set in script tag in Head after page load
window.onload = function () {
var LayoutJsBundleUrl = ('@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/bundles/LayoutJs")');
var script = document.createElement("script");
script.src = LayoutJsBundleUrl;
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
}
Also get bundle url from
Scripts.Url("~/bundles/LoginJs")
Comments
Post a Comment