import { AfterViewInit, Component, ElementRef, OnInit } from '@angular/core';
declare var $: any; // used to access jQuery
@Component({
selector: 'app-home-page',
templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.scss']
})
export class HomePageComponent implements OnInit, AfterViewInit {
@ViewChild('carousel') _carousel!: ElementRef;
constructor() { }
ngOnInit(): void {
}
ngAfterViewInit() {
const carouselElem = this._carousel?.nativeElement;
const carousel = $(carouselElem).carousel();
}
}