Angular: How to detect toggle status in ng-bootstrap dropdown where there are several dropdowns
问题 I recently asked this question and it was well answered. But I have another question: How to detect toggle status in ng-bootstrap dropdown where there are several dropdowns? When I try doing it returns the status of the firstdropdown only. I cannot use a unique id as they don't contain the 'isopen()' method. How can I detect toggle status in ng-bootstrap dropdown where there are several dropdowns? 回答1: I would do something like this: I get all the dropdowns with ViewChildren @ViewChildren