问题描述:在Angular中使用Bootstrap的轮播组件时,发现轮播不起作用。
解决方法:
declare var $: any;
import { AfterViewInit } from '@angular/core';
export class MyComponent implements AfterViewInit {
ngAfterViewInit() {
$(document).ready(function(){
$('.carousel').carousel();
});
}
}
以上是解决Angular中Bootstrap轮播不起作用的一种常见方法。请根据具体情况进行调整和修改。