Skip to content

feat: support angular generator #202

@tomflenner

Description

@tomflenner

Description

Currently, the OpenFeature CLI supports code generation for several languages and frameworks (C#, Go, Java, NestJS, Node.js, Python, and React), but Angular is notably absent. Angular is a widely-used frontend framework with a large ecosystem, and developers using Angular would benefit from the same type-safe, auto-generated feature flag accessors that React users currently enjoy.

OpenFeature Angular SDK Integration

OpenFeature already provides an official Angular SDK. The Angular generator should leverage this SDK in the same way the React generator utilizes the @openfeature/react-sdk, ensuring consistency across framework integrations and avoiding reimplementation of core functionality.

The generated code should:

  • Import and use the OpenFeature Angular SDK's client and services
  • Generate type-safe wrapper methods that call the underlying SDK

Scope for Initial Implementation

For the first iteration, the generator could focus on generating a type-safe Angular service/client that wraps the OpenFeature Angular SDK, similar to how the React generator creates hooks.

Open Question: Should structural directives be included in the initial implementation, or can this be deferred to a follow-up iteration? While directives would provide a more Angular-idiomatic template-based approach, starting with service-based access might be sufficient for an first version. At least, with my little Angular knowledge it would help me contribute on this first step. Feedback from the community would be valuable here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions