Skip to content

Commit

Permalink
feat(forms): add export of FormsModule where [ngModel] selector is pr…
Browse files Browse the repository at this point in the history
…esent (#931)

* try to fix #929 by importing FormsModule because the selectors use [ngModel]

* export FormsModule in all modules which use ngModel selector binding because every template which uses such a module would anyway import FormsModul which is now no longer necessary

fixes #929
  • Loading branch information
Martin-Wegner authored and valorkin committed Sep 6, 2016
1 parent 3606592 commit b5c8448
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
4 changes: 3 additions & 1 deletion components/buttons/buttons.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { ButtonCheckboxDirective } from './button-checkbox.directive';
import { ButtonRadioDirective } from './button-radio.directive';

@NgModule({
imports: [FormsModule],
declarations: [ButtonCheckboxDirective, ButtonRadioDirective],
exports: [ButtonCheckboxDirective, ButtonRadioDirective]
exports: [ButtonCheckboxDirective, ButtonRadioDirective, FormsModule]
})
export class ButtonsModule {
}
6 changes: 4 additions & 2 deletions components/datepicker/datepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import { ComponentsHelper } from '../utils/components-helper.service';

@NgModule({
imports: [CommonModule, FormsModule],
declarations: [DatePickerPopupDirective, DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent],
exports: [DatePickerPopupDirective, DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent],
declarations: [DatePickerComponent, DatePickerInnerComponent, DatePickerPopupDirective, DayPickerComponent,
MonthPickerComponent, YearPickerComponent],
exports: [DatePickerComponent, DatePickerInnerComponent, DatePickerPopupDirective, DayPickerComponent, FormsModule,
MonthPickerComponent, YearPickerComponent],
providers: [ComponentsHelper]
})
export class DatepickerModule {
Expand Down
7 changes: 4 additions & 3 deletions components/pagination/pagination.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { PagerComponent } from './pager.component';
import { PaginationComponent } from './pagination.component';

@NgModule({
imports: [CommonModule],
declarations: [PaginationComponent, PagerComponent],
exports: [PaginationComponent, PagerComponent]
imports: [CommonModule, FormsModule],
declarations: [PagerComponent, PaginationComponent],
exports: [FormsModule, PagerComponent, PaginationComponent]
})
export class PaginationModule {
}
5 changes: 3 additions & 2 deletions components/rating/rating.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { RatingComponent } from './rating.component';

@NgModule({
imports: [CommonModule],
imports: [CommonModule, FormsModule],
declarations: [RatingComponent],
exports: [RatingComponent]
exports: [FormsModule, RatingComponent]
})
export class RatingModule {
}
2 changes: 1 addition & 1 deletion components/timepicker/timepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TimepickerComponent } from './timepicker.component';
@NgModule({
imports: [CommonModule, FormsModule],
declarations: [TimepickerComponent],
exports: [TimepickerComponent]
exports: [FormsModule, TimepickerComponent]
})
export class TimepickerModule {
}
7 changes: 4 additions & 3 deletions components/typeahead/typeahead.module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { TypeaheadContainerComponent } from './typeahead-container.component';
import { TypeaheadDirective } from './typeahead.directive';
import { ComponentsHelper } from '../utils/components-helper.service';

@NgModule({
imports: [CommonModule],
declarations: [TypeaheadDirective, TypeaheadContainerComponent],
exports: [TypeaheadDirective, TypeaheadContainerComponent],
imports: [CommonModule, FormsModule],
declarations: [TypeaheadContainerComponent, TypeaheadDirective],
exports: [FormsModule, TypeaheadContainerComponent, TypeaheadDirective],
providers: [ComponentsHelper],
entryComponents: [TypeaheadContainerComponent]
})
Expand Down

0 comments on commit b5c8448

Please sign in to comment.