Skip to content

Feat/mock data #1997

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

Merged
merged 4 commits into from
Jan 18, 2019
Merged

Feat/mock data #1997

merged 4 commits into from
Jan 18, 2019

Conversation

valentinkononov
Copy link
Contributor

Please read and mark the following check list before creating a pull request (check one with "x"):

Short description of what this resolves:

with this change all components, which used data services before, now use abstract classes of service interfaces, mock services extend interface services, CoreModule contains code to inject needed implementation of some service.

By all this, now it's possible to easily change any single service with different mock or with data from api

@valentinkononov valentinkononov mentioned this pull request Jan 17, 2019
2 tasks
@dizco
Copy link
Contributor

dizco commented Jan 17, 2019

Out of curiosity, what is the reason why you chose to use abstract classes rather than interfaces, given that you don't implement any function or have any member variables in the abstract classes?

@nnixaa
Copy link
Collaborator

nnixaa commented Jan 18, 2019

Hey @dizco, Angular Injector doesn't support interfaces as tokens (as interfaces are not available at runtime), so, unfortunately, we can only use abstract classes.

@valentinkononov
Copy link
Contributor Author

yeah, that's right. My first intention was to use interfaces. But then I faced the issue, that Angular Dependency Injector cannot use interface as is. So the decision was to change stuff to abstract classes, behaving more like interfaces

@dizco
Copy link
Contributor

dizco commented Jan 18, 2019

@nnixaa @pinckrow makes total sense. Learn new things every day I guess haha!

@nnixaa nnixaa merged commit cac36f0 into akveo:master Jan 18, 2019
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

Successfully merging this pull request may close these issues.

3 participants