I have found a small project in angular. I am trying to keep everything in a liability manner and I I am very happy with the structure. The only index that I think does not look very good is index.html. All JS files are included in the lower part of the file and I do not see it. I'm adding more files (controllers, services, etc.) as I go and the list can be quite long.
So my question is: Is this normal, is it all included in the index file or are there the way to move them all into one file and reference index.html?
& lt; Html & gt; & Lt; Top & gt; ... & lt; / Head & gt; & Lt; Body & gt; ... ... & lt; Script src = "property / js / angular.js" & gt; & Lt; / Script & gt; & Lt; Script src = "property / js / angular-way.js" & gt; & Lt; / Script & gt; & Lt; Script src = "property / js / angular-touch.js" & gt; & Lt; / Script & gt; & Lt; Script src = "property / js / angular-sanitize.js" & gt; & Lt; / Script & gt; & Lt; Script src = "asset / js / angel-animate.mm.js" & gt; & Lt; / Script & gt; & Lt; Script src = "asset / js / jazzery-2.1.3mms.js" & gt; & Lt; / Script & gt; & Lt; Script src = "assets / js / bootstrap.money.js" & gt; & Lt; / Script & gt; & Lt; Script src = "app / app.js" & gt; & Lt; / Script & gt; & Lt; Script src = "app / app.routes.js" & gt; & Lt; / Script & gt; & Lt; Script src = "Controller / Controller On. Js" & gt; & Lt; / Script & gt; & Lt; Script src = "admin / controller two two .js" & gt; & Lt; / Script & gt; & Lt; Script src = "Controller / Controller with" Js "& gt; & Lt; / Script & gt; & Lt; Script src = "directives / directiveOne.js" & gt; & Lt; / Script & gt; & Lt; Script src = "directives / directiveTwo.js" & gt; & Lt; / Script & gt; & Lt; Script src = "services / serviceOne.js" & gt; & Lt; / Script & gt; & Lt; Script src = "services / serviceTwo.js" & gt; & Lt; / Script & gt; & Lt; Script src = "services / serviceThree.js" & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Update 07/04/2015
I have finished using GLUP for those looking for some help on this , I have followed this short tutorial:
There are some possible solutions that I know automatically Will use your script tag for index.html:
-
Using - Task / Build Runner You can use it:
A stylesheet for bunch, java Script and webcontent reference injection plugin
-
- Javascript Task Runner You
-
Other Inject the references to files in files (looks like scripts and stylesheets in an HTML file)
Option to see which I have not used -
You can find many discussions on Gulp versus Grunt, both can make your life easier and solve your problem.
See:
No comments:
Post a Comment