How should I include model classes in an Angular module? How should I include model classes in an Angular module? typescript typescript

How should I include model classes in an Angular module?


You don't need to import neither declare your DTOs in app.module.ts. It's available for a direct import in your components, directives, etc..Simply import it in whichever component/service/directive,pipes you need with other imports:

import { Accreditation } from "./accreditation";

If you wish to share your DTO among several modules, put it in a shared folder and access it with a relative path, i.e.

import { Accreditation } from "./shared/accreditation";