How to refer all angular controllers in one file and refer that one file on Index.html
up vote
0
down vote
favorite
Is there a way to refer all angular controllers in one common file and refer that file on Index.html
Right now I have these two controller on Index.html
<script src="Angular/angularController1.js"></script>
<script src="Angular/angularController2.js"></script>
As going for forward I may have more controllers. So is there way to separate all these controller references from Index.html to some file and refer that file back on Index.html
html angularjs
add a comment |
up vote
0
down vote
favorite
Is there a way to refer all angular controllers in one common file and refer that file on Index.html
Right now I have these two controller on Index.html
<script src="Angular/angularController1.js"></script>
<script src="Angular/angularController2.js"></script>
As going for forward I may have more controllers. So is there way to separate all these controller references from Index.html to some file and refer that file back on Index.html
html angularjs
1
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each.js
,.css
, etc.
– Aleksey Solovey
Nov 8 at 14:43
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Is there a way to refer all angular controllers in one common file and refer that file on Index.html
Right now I have these two controller on Index.html
<script src="Angular/angularController1.js"></script>
<script src="Angular/angularController2.js"></script>
As going for forward I may have more controllers. So is there way to separate all these controller references from Index.html to some file and refer that file back on Index.html
html angularjs
Is there a way to refer all angular controllers in one common file and refer that file on Index.html
Right now I have these two controller on Index.html
<script src="Angular/angularController1.js"></script>
<script src="Angular/angularController2.js"></script>
As going for forward I may have more controllers. So is there way to separate all these controller references from Index.html to some file and refer that file back on Index.html
html angularjs
html angularjs
asked Nov 8 at 14:16
sgl
9018
9018
1
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each.js
,.css
, etc.
– Aleksey Solovey
Nov 8 at 14:43
add a comment |
1
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each.js
,.css
, etc.
– Aleksey Solovey
Nov 8 at 14:43
1
1
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each
.js
, .css
, etc.– Aleksey Solovey
Nov 8 at 14:43
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each
.js
, .css
, etc.– Aleksey Solovey
Nov 8 at 14:43
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53209581%2fhow-to-refer-all-angular-controllers-in-one-file-and-refer-that-one-file-on-inde%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
you must include a script for each separate file (controller, etc.), there is no automatic magical way of including all of them with just a single script. The only solution you have is to bundle them together with something like Webpack - a module bundler (feel free to search for something similar). It will take all of your imports and generate one file for each
.js
,.css
, etc.– Aleksey Solovey
Nov 8 at 14:43