I'm creating a Ribbon component for angular 2 (essentially to learn angular 2 ^^) and I'm wondering how to make a dropdown menu in the angular 2 way. Of course, I could use bootstrap or even jQuery, but I'm wondering what's the best way to do that from within my component. Indeed, I could just do a method in my TypeScript file that will do something like :
("my-dom-menu").slideDown()
However, I know that in Angular 1, it's not a best practice to mess with the DOM directly from within the controller so I guess it's still the case with angular 2.
Would it be a better idea to create a directive that is supposed to display the menu when I click on a button ? Is it better to mess with the DOM from within a directive than from a component ?
Thanks