Skip to content

Commit

Permalink
fix(tests): "no provider" error when running tests (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
Igonato authored and valorkin committed Sep 14, 2016
1 parent 6effd07 commit 8483615
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion components/datepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { ControlValueAccessor, NgModel } from '@angular/forms';
<monthpicker tabindex="0"></monthpicker>
<yearpicker tabindex="0"></yearpicker>
</datepicker-inner>
`
`,
providers: [NgModel]
})
/* tslint:enable:component-selector-name component-selector-type */
export class DatePickerComponent implements ControlValueAccessor {
Expand Down
3 changes: 2 additions & 1 deletion components/pagination/pager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const PAGER_TEMPLATE = `
/* tslint:disable */
@Component({
selector: 'pager[ngModel]',
template: PAGER_TEMPLATE
template: PAGER_TEMPLATE,
providers: [NgModel]
})
/* tslint:enable */
export class PagerComponent extends PaginationComponent implements OnInit {
Expand Down
1 change: 1 addition & 0 deletions components/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const PAGINATION_TEMPLATE = `
@Component({
selector: 'pagination[ngModel]',
template: PAGINATION_TEMPLATE,
providers: [NgModel]
})
/* tslint:enable */
export class PaginationComponent implements ControlValueAccessor, OnInit, PaginationConfig, KeyAttribute {
Expand Down
3 changes: 2 additions & 1 deletion components/rating/rating.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { ControlValueAccessor, NgModel } from '@angular/forms';
<i (mouseenter)="enter(index + 1)" (click)="rate(index + 1)" class="glyphicon" [ngClass]="index < value ? r.stateOn : r.stateOff" [title]="r.title" ></i>
</template>
</span>
`
`,
providers: [NgModel]
})
export class RatingComponent implements ControlValueAccessor, OnInit {
@Input() public max:number;
Expand Down
3 changes: 2 additions & 1 deletion components/timepicker/timepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function addMinutes(date:any, minutes:number):Date {
</tr>
</tbody>
</table>
`
`,
providers: [NgModel]
})
export class TimepickerComponent implements ControlValueAccessor, OnInit {
public cd:NgModel;
Expand Down

0 comments on commit 8483615

Please sign in to comment.