Understanding, Node js uses the CommonJS module template, and in the CommonJS pattern, we use require () to import the Node module.
In Angular 2 development, we use @ angular / core, @ angular / common, etc. node.
My question is:
Why do we use "import {} from" @ angular / core "[which is the syntax of the ES6 module] instead of the commonJS syntax require () to access the Node modules in angular2 files.
source
share