我在 CDN 上使用 flickity,但是当它加载页面时不起作用。我已经将脚本放在 index.html 中,但它不起作用
组件.ts
declare var jquery:any;
declare var $ :any;
export class ProfileComponent implements OnInit {
constructor() {
$('.carousel-category').flickity({
freeScroll: true,
contain: true,
prevNextButtons: false,
pageDots: false
})
}
}