What is the best way to handle this in AngularJS?
I have an AngularJS app that includes concatenated/minified javascript files, however in my development environment I want to load the non-concatented/non-minified versions of the file. I want this because it is easier to debug the code with non-minified files.
<!-- production -->
<script src="js/all.min.js"></script> <!-- contains all concatenated/minified code -->
<!-- dev -->
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
<script src="js/directives.js"></script>
I am not sure how to do this since in AngularJS I couldn't find a conditional mechanism that is suitable. I had thought about using a directive on the each script tag?
I am using Gulp to concat and uglify the files, but I couldn't find a method to accomplish this with Gulp.
PHP is the server-side language.
Any help will be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire