-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(data): add entity config in App module declaration #2133
Conversation
Preview docs changes for f42c7c4 at https://previews.ngrx.io/pr2133-f42c7c4/ |
Preview docs changes for ee1d059 at https://previews.ngrx.io/pr2133-ee1d059/ |
Thanks for the PR @norato! Isn't this pretty much a required step when adding |
Hello, @brandonroberts. The |
modules/data/schematics/ng-add/files/entity-metadata.ts.template
Outdated
Show resolved
Hide resolved
As the |
Preview docs changes for 6b245b1 at https://previews.ngrx.io/pr2133-6b245b1/ |
120a200
to
20db92f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM.
Can you confirm that what this schematic is doing is correct @wardbell ?
It will create an empty config file:
import { EntityMetadataMap, EntityDataModuleConfig } from '@ngrx/data';
const entityMetadata: EntityMetadataMap = {};
const pluralNames = { };
export const entityConfig: EntityDataModuleConfig = {
entityMetadata,
pluralNames
};
And it will import, and pass is to the DataModule
:
EntityDataModule.forRoot(entityConfig)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
On ng-add @ngrx/data we do not create the entity-config file
Closes #
What is the new behavior?
Create and declare entity-config file to AppModule.
Does this PR introduce a breaking change?
Other information