What are the differences between ngmodule and javascript module?

Below are the main differences between Angular NgModule and javascript module,

NgModuleJavaScript module
NgModule bounds declarable classes onlyThere is no restriction classes
List the module's classes in declarations array onlyCan define all member classes in one giant file
It only export the declarable classes it owns or imports from other modulesIt can export any classes
Extend the entire application with services by adding providers to provides arrayCan't extend the application with services

June 15, 2022