html - Is a way I can render CSS/Javascript bundles without using ASP.NET MVC? -


There is only one thing that uses my code, which requires ASP.NET MVC:

  & lt; & Lt; & Lt; HTML is here & gt; & Gt; & Gt; & Lt; Body & gt; & Lt; & Lt; & Lt; Some HTML here & gt; & Gt; & Gt; @ Scripts Renderers ("~ / / bundle / jquery") @ scripts. Renderers ("~ / bundle / text view") @ scripts Renderers ("~ / / bundle / angular") @ scripts Render ("~ / Bundle / AngularPad") & Lt; / Body & gt; & Lt; / Html & gt;   

My bundle config.ace

  There is a sample from bundles here. (New Style Bundle ("~ / bundles / css"). ("~ / Content / css / * .css")); The ability to render CSS in debug or release is really good, but I want to fully use MVC and transfer only the usage and index.html page and ASP.NET Web API. Is there any way to get the same functionality with rendering bundles without using a controller?   

You can do two things:

  1. You already These bundles create a virtual path so that you can access them externally.
  2. You can create your own HTML page using the RazorView engine, and by doing so, get the "strength" of the razor engine for things like bundles - you create a path that makes you single Action will help the server in your stable files.

    We will be routing:

      route. Map route (name: "HTMLViewRoute", url: "Htmls / {* pathInfo}", default: new {controller = "HTMLFileRouting", action = "view route"}); Take the pathino in the path and use the path of your html file (server mappath) and you do not want a model from the return view (file path, blank).   

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -