Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of files by modules #39

Open
uaKorona opened this issue Oct 8, 2015 · 1 comment
Open

Order of files by modules #39

uaKorona opened this issue Oct 8, 2015 · 1 comment

Comments

@uaKorona
Copy link

uaKorona commented Oct 8, 2015

Hello!
Can I use angular modules to change an order of my angular files ?

For example:
I have the main angular module and two additional modules:

angular.module('app', ['mod1']); 

angular.module('mod1', ['mod2']);
angular.module('mod2', []);

Each of additional modules has a controller in a separated file:
mod1Controller.js

angular.module('mod1').controller('mod1Controller', mod1Controller);

mod2Controller.js

angular.module('mod2').controller('mod2Controller', mod2Controller);

I need that in my index.html will have the next order
(file mod2Controller.js should be injected before mod1Controller.js):

<script src="app.js"></script>
<script src="mod2Controller.js"></script>
<script src="mod1Controller.js"></script>

Is it possible ?

@OCharyshkin
Copy link

I would like to have the same behaviour. And... if I replace

isDependecyUsedInAnyDeclaration(dep, deps) 

call with

!isDependecyUsedInAnyDeclaration(dep, deps) 

in gulp-angular-filesort\index.js script I get the excpected order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants