On Thursday, January 15, 2015 at 10:45:10 AM UTC-5, Andrew Schmadel wrote:
>
> I also can't think of much precedent for CommonJS modules that silently do 
> things behind the scenes, and subsequently just return a string.  
>
> If we want to write our own angular modules with CommonJS, presumably we'd 
> want to be able to write something like:
> ```js
> require('ngApp').controller('homeCtrl', ctrlFunc);
> ```
>
> In my experience, Angular's module system is a key weakness.  If we build 
> compatibility with established module systems, large Angular will be able 
> to immediately take advantage of the improved encapsulation and 
> dependency-resolution that CJS promotes.  Similarly, this gradually moves 
> toward the module system that will be used in Angular 2.x.
>
> While CJS support is a great short-term goal, I believe that Angular 1.x 
> needs to adopt (or, at least support) ES6 modules.  ES6 is the future, the 
> module specification has been finalized, and the module syntax can be 
> efficiently transpiled into ES5 code that can be used today.  The upgrade 
> path to Angular 2 will not necessarily be smooth, but this is one area 
> where we can certainly ease the transition. 
>

I certainly would be delighted to have the 1.x line take a crack at 
changing the module story. However, I hope that this small step by Ben can 
be on a different track. His is a "what tiny step can have a big effect 
without opening a big RequireJS/CommonJS/UMD/ES6 argument" and big changes 
in 1.x.

But just to support your point, smoothing the 2.x transition would be a 
valuable discussion, and modules is a VERY obvious candidate.

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to