angularjs - multiple CDN bundle in asp.net MVC -



angularjs - multiple CDN bundle in asp.net MVC -

i have been trying bundle js files cdn single bundle so:

bundles.usecdn = true; string cdnhost = "https://ajax.googleapis.com/"; bundles.add(new scriptbundle("~/bundles/angularcdn", cdnhost).include( "~/ajax/libs/angularjs/1.3.0-beta.17/angular.js", "~/ajax/libs/angularjs/1.3.0-beta.17/angular-cookies.js", "~/ajax/libs/angularjs/1.3.0-beta.17/angular-route.js")); bundletable.enableoptimizations = true;

but maintain getting "angular undefined".. , when view source page loads main cdn url : <script src="https://ajax.googleapis.com/"></script>

i tried set debug = false.

what doing wrong ?

the cdnhost parameter refers alternate url bundle when stored in content delivery network. cdn boundle supposed loaded 1 file , should contain combined content of files uploaded on cdn (will https://ajax.googleapis.com/ in case):

bundles.add(new scriptbundle("~/bundles/angularcdn", cdnhost).include( "~/ajax/libs/angularjs/1.3.0-beta.17/angular.js", "~/ajax/libs/angularjs/1.3.0-beta.17/angular-cookies.js", "~/ajax/libs/angularjs/1.3.0-beta.17/angular-route.js"));

basically have 3 options:

define multiple bundles 1 per each resource "~/ajax/libs/angularjs/1.3.0-beta.17/angular.js" , version hosted on cdn do not utilize cdnhost parameter combine files manually , upload them on custom cdn utilize cdn cdnhost

asp.net-mvc angularjs bundle

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -