Typescript中的Bootstrap

Typescript中的Bootstrap

本文介绍了专注于Angular 7/7 + Typescript中的Bootstrap Dropdown元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在打开下拉列表时专注于特定(Bootstrap)下拉元素。由于Bootstrap使用PopperJS / Jquery,因此它们在Angular的代码之外运行(根据我的理解)



这是参考@ConnorsFan对

解决方案

根据@ConnorsFan的解决方案是使用Bootstrap并 Js而不是常规的Jquery / popper.js


I am trying to focus on a specific (Bootstrap) Dropdown Element on opening the dropdown. Since Bootstrap uses PopperJS/ Jquery they run outside Angular's code (as per my understanding)

This is in reference to @ConnorsFan 's solution to How to get an element in *ngFor in Angular dynamically without using Js id selector

I can use Javascript setTimout method to achieve this, but want to know the best way

Code that needs fixing -> https://stackblitz.com/edit/angular-nmvn6g

on opening the Dropdown week 7 should be focussed

解决方案

The Solution as per @ConnorsFan is to use Bootstrap and ng-Bootstrap Js instead of regular Jquery/popper.js

这篇关于专注于Angular 7/7 + Typescript中的Bootstrap Dropdown元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 02:04