Reputation: 5025
For an angular 1.x project that uses typescript, what are the Pros and Cons of using AMD?
Meaning, running tsc
with the params -m amd
and using requirejs, versus simply using the /// <reference path="..." />
for internal modules as well and wrapping in module
(s).
Which-
Upvotes: 2
Views: 881
Reputation: 276057
- Makes more sense for angularjs?
Angular1 : --module amd
Angular2 : --module system
as that is what the angularjs team uses internally.
- Is better for large scale angular apps?
Yes. --out
and reference
comments are a bad idea. More : https://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md
- Would be better at minification+obfuscation of large code base?
It would be the same. The main advantage is dev time readability and maintainability.
Upvotes: 3