Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Client] - Switching Data Source via Dependency Injection #197

Open
Char2sGu opened this issue Sep 17, 2024 · 0 comments
Open

[Client] - Switching Data Source via Dependency Injection #197

Char2sGu opened this issue Sep 17, 2024 · 0 comments

Comments

@Char2sGu
Copy link
Contributor

Current Features

There's no data available for development. Several errors reported in console.
image

Desired Additional Features

Leveraging Angular's DI system, we can have two different implementations of the data fetching services, and provide them in two modules:

  • RealDataModule
  • MockDataModule

The different implementations are provided in the corresponding modules, and we can switch from these two data sources by importing different modules. When combined with the environment.ts file, it is possible to automatically switch to production data for production build, and use mock data for development by default.

Example: https://github.com/Char2sGu/reply/tree/develop/projects/reply/src/backends

Screenshots (as needed)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant