yuyang041060120 / angular2-ui-switch

angular2 ui switch component

Home Page:http://yuyang041060120.github.io/angular2-ui-switch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit tests: Can't bind to 'ngModel' since it isn't a known property of 'ui-switch'

lewtur opened this issue · comments

commented

I've managed to use the module successfully, but now i'm trying to make it pass our unit tests, and it fails with the error Can't bind to 'ngModel' since it isn't a known property of 'ui-switch'.

Here is my test component

import { UiSwitchModule } from 'angular2-ui-switch';

describe('HubPreviewComponent', () => {
  let component: HubPreviewComponent;
  let fixture: ComponentFixture<HubPreviewComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [HubPreviewComponent, OfferPreviewComponent],
      imports: [ReactiveFormsModule, UiSwitchModule],
      providers: [ ... ]
    }).compileComponents();
  }));

I've also tried using import { UiSwitchModule } from '../../../node_modules/angular2-ui-switch/src'; as a previous post suggested.