OpenAPITools / OpenAPITools/openapi-generator
[REQ] [angular-typescript] Support lazy loaded module
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I'd like to use the generated services in a lazy loaded module in angular. So all related code should not be part of the initial bundle.
Describe the solution you'd like
Either this should be possible by default (preferred) or possible to enable via a configuration option.
Describe alternatives you've considered
Importing the GeneratedModule.forRoot(..) in a lazy loaded module currently won't respect the provided Configuration.
Additional context
Probably the services should be provided in the generated module - e.g.:
@Injectable({
providedIn: MyApiModule,
})
export class MyApiStubService {
}
see https://angular.io/guide/providers#providedin-and-ngmodules
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the angular-typescript generator's generated module and the GeneratedModule.forRoot(..) entry point described in the issue. Investigate how services and Configuration are registered for lazy-loaded modules; done means generated code can be loaded lazily without entering the initial bundle and Configuration is respected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100