Skip to content

Commit

Permalink
Add DxHttpModule to Angular app template (#894)
Browse files Browse the repository at this point in the history
* Import DxHttpModule

* Add http module test

---------

Co-authored-by: Rochmar Nicolas (DevExpress) <[email protected]>
  • Loading branch information
tomodasheesh and Rochmar Nicolas (DevExpress) authored Jul 1, 2024
1 parent 5289a6c commit 755ad92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/devextreme-schematics/src/add-layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function updateAppModule(host: Tree, sourcePath: string) {
};

const rules = [
modifyFileRule(appModulePath, importSetter('DxHttpModule', 'devextreme-angular/http')),
modifyFileRule(appModulePath, importSetter('SideNavOuterToolbarModule', './layouts')),
modifyFileRule(appModulePath, importSetter('SideNavInnerToolbarModule', './layouts')),
modifyFileRule(appModulePath, importSetter('SingleCardModule', './layouts')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ describe('layout', () => {
expect(styles[2]).toBe('src/themes/generated/theme.additional.css');

const moduleContent = tree.readContent('/src/app/app.module.ts');
expect(moduleContent).toContain('import { DxHttpModule }');
expect(moduleContent)
.toContain('import { SideNavOuterToolbarModule, SideNavInnerToolbarModule, SingleCardModule }');
expect(moduleContent)
Expand Down

0 comments on commit 755ad92

Please sign in to comment.