gruntjs / grunt-contrib-compass

Compile Compass to CSS.
http://gruntjs.com/
MIT License
626 stars 128 forks source link

AngularJS Grunt load JS file with dynamic query string parameter #222

Closed ghost closed 9 years ago

ghost commented 9 years ago

I am developing application with yeoman + grunt + angularJs. To load the JS file only when require I have added JS file path inside calendar.html using below code.

<! - - build:js({.tmp,app}) scripts/fullcalendar.js - - > < script src="scripts/plugins/fullcalendar/fullcalendar.js" >< / script > <! - - endbuild - - >

This solution is working properly. But now whenever I load my Calendar page a fresh request goes to fullcalenar.js with dynamic query string parameter like this. If I move above calendar.html code inside index.html file, application works properly and cache the file without combining with rest of the js. But if I add that code inside index.html, the fullcalendar.js file will get loaded with first page itself.

http://localhost/scripts/fullcalendar.a13f9b72f8.js?_=1422010995753

Grunt file code is

compass: { options: { javascriptsDir: '<%= yeoman.app %>/scripts', fontsDir: '<%= yeoman.app %>/styles/fonts', importPath: './bower_components', relativeAssets: false, assetCacheBuster: false, raw: 'Sass::Script::Number.precision = 10\n' }, server: { options: { debugInfo: false } } }

Please help me. Thanks in advance.

sindresorhus commented 9 years ago

Not sure how this has anything to do with this plugin, but support questions are better asked on StackOverflow anyways.

ghost commented 9 years ago

Thanks for replying. Already posted yesterday.

http://stackoverflow.com/questions/28108792/angularjs-grunt-load-js-file-with-dynamic-query-string-parameter