gilmishal gilmishal - 1 year ago 129
TypeScript Question

Difference between ngModules and index.ts

I have been looking at angular seed and I am wondering why do they use both

and modules.
from my understanding, they can both be used to export typescript types.

Answer Source

These two are entirely unrelated.

index.ts is for TypeScript imports. You need these whenever you use an identifier in a typescript file that is declared in another typescript file.

NgModule is to register directives, components, pipes, and providers in other NgModules.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download