Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 带开关的角度-分页不起作用_Angular_Typescript_Swiper - Fatal编程技术网

Angular 带开关的角度-分页不起作用

Angular 带开关的角度-分页不起作用,angular,typescript,swiper,Angular,Typescript,Swiper,我正在使用我的angular应用程序中的swiper,使用此文档- 在my styles.css中- @import '~swiper/swiper-bundle'; 我的html看起来像- <h1>Thumbs</h1> <swiper [slidesPerView]="1" [spaceBetween]="50" [pagination]="{ clickable: true }" [autopla

我正在使用我的angular应用程序中的swiper,使用此文档-

在my styles.css中-

@import '~swiper/swiper-bundle';
我的html看起来像-

<h1>Thumbs</h1>
<swiper [slidesPerView]="1" [spaceBetween]="50" [pagination]="{ clickable: true }" [autoplay]="true">
    <ng-template swiperSlide>Slide 1</ng-template>
    <ng-template swiperSlide>Slide 2</ng-template>
    <ng-template swiperSlide>Slide 3</ng-template>
    <ng-template swiperSlide>Slide 4</ng-template>
    <ng-template swiperSlide>Slide 5</ng-template>
    <ng-template swiperSlide>Slide 6</ng-template>
</swiper>

swiper正常工作,除了分页,我看不到,知道为什么吗?

显然它与版本有关,它在“6.4.15”上工作,但在最新的swiper版本上不工作

import { Component, OnInit } from '@angular/core';

// import Swiper core and required components
import SwiperCore, {
    Navigation,
    Pagination,
    Scrollbar,
    A11y,
    Virtual,
    Zoom,
    Autoplay,
    Thumbs,
    Controller
} from "swiper/core";

SwiperCore.use([
    Navigation,
    Pagination,
    Scrollbar,
    A11y,
    Virtual,
    Zoom,
    Autoplay,
    Thumbs,
    Controller
]);

@Component({
    selector: 'esp-portal-intro',
    templateUrl: './portal-intro.component.html',
    styleUrls: ['./portal-intro.component.scss']
})
export class PortalIntroComponent implements OnInit {


    constructor() {
    }
}