Closed lewtur closed 7 years ago
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'.
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.
import { UiSwitchModule } from '../../../node_modules/angular2-ui-switch/src';
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
I've also tried using
import { UiSwitchModule } from '../../../node_modules/angular2-ui-switch/src';
as a previous post suggested.