We have an AngularJS front end application where the backend is ASP.NET MVC used as an API. We have removed all controllers and views and depend primarily on AngularJS based HTML as views. What we need to do now is bundle our js and css, but we have no access to Razor syntax.
Since we don't have access to Razor, we need a way to bundle our JS and CSS files. How do we bundle those files without Razor?
You're looking for ResolveBundleUrl, although keep in mind this needs to be generated by the server so you'll need to get Angular to make a request to get this URL so you won't be able to include Angular inside the bundle.
However, it's also possible to hardcode your bundle. Assuming you register like: new ScriptBundle("~/js/mybundle")
:
<script src="/js/mybundle"></script>
Although you won't get the versioning included with the Razor implementation.
Finally, the whole ASP.NET MVC model doesn't offer a huge amount of benefits if already using Angular. You should move your Angular into a plain HTML project and use something like GruntJS to automate your bundling & minification. Then you can use WebAPI as the server-backend.