Skip to content

Commit 1968efd

Browse files
author
Fernando Gonzalez Goncharov
committed
enhancement/2 - provide number input as a module
1 parent ce2679a commit 1968efd

4 files changed

Lines changed: 29 additions & 5 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { NumberInputModule } from './number-input.module';
2+
3+
describe('NumberInputModule', () => {
4+
let numberInputModule: NumberInputModule;
5+
6+
beforeEach(() => {
7+
numberInputModule = new NumberInputModule();
8+
});
9+
10+
it('should create an instance', () => {
11+
expect(numberInputModule).toBeTruthy();
12+
});
13+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { CommonModule } from '@angular/common';
2+
import { NgModule } from '@angular/core';
3+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4+
5+
import { NumberInputComponent } from './number-input.component';
6+
7+
@NgModule({
8+
imports: [CommonModule, FormsModule, ReactiveFormsModule],
9+
declarations: [NumberInputComponent],
10+
exports: [NumberInputComponent]
11+
})
12+
export class NumberInputModule {}

projects/ng-rocketparts/src/lib/ng-rocketparts.module.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
44

5-
import { NumberInputComponent } from './components/number-input/number-input.component';
5+
import { NumberInputModule } from './components/number-input/number-input.module';
66

7-
const COMPONENTS = [NumberInputComponent];
7+
const MODULES = [NumberInputModule];
88

99
@NgModule({
1010
imports: [CommonModule, FormsModule, ReactiveFormsModule],
11-
declarations: [...COMPONENTS],
12-
exports: [...COMPONENTS]
11+
exports: [...MODULES]
1312
})
1413
export class NgRocketPartsModule {}

projects/ng-rocketparts/src/public_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* Public API Surface of ng-rocketparts
33
*/
44

5-
export * from './lib/components/number-input/number-input.component';
5+
export * from './lib/components/number-input/number-input.module';
66
export * from './lib/ng-rocketparts.module';

0 commit comments

Comments
 (0)