On Thu, Jul 21, 2016 at 7:23 PM, 'Lucas Lacroix' via AngularJS <
[email protected]> wrote:
> I do not believe there are any best practices - Google turns up nothing
> and if it's not in Google, it doesn't exist (a little humor there).
>
Well, if its not there, why not create it? 😄
> The ordering of the imports has no effect on the application and, IMO, it
> does not increase readability/understanding when you enforce an arbitrary
> sort on the imports.
>
I think it improves readability, as it makes it easier to locate some
package being imported.
> The only thing I do is split the imports into two groups, placing external
> modules first like so:
>
> import {Injectable, provide} from '@angular/core';
> import {Http} from '@angular/http';
>
> import {MyComponent} from './my-component';
>
I do this already.
I think ordering by alphabetical order is the natural step forward from
here.
--
Supun Budhajeewa
---
Website: http://budhajeewa.com
Blog: http://blog.budhajeewa.com
Microblog: http://mblog.budhajeewa.com
Google+: http://j.mp/gplusbudhajeewa
Twitter: https://twitter.com/budhajeewa
Facebook: https://facebook.com/budhajeewa
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.