Hi:
I created a new ionic 7 angular project and I want to use the swiper.js.
But the tutorial there is in the site (Set Up Swiper.js for Angular Slides [Example] | Ionic) is not compatible with the StandAlone components. It doesn’t have modules in it. Only components.
Do you have a tutorial that it does work with the new ionic?
Need to add the CUSTOM_ELEMENTS_SCHEMA
, which tells Angular that we will be using custom elements.
app.component.spec.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
});