Good time,
Does Angular2 have the ability to manipulate the DOM tree?
Task: a simple drop-down menu, when you click on a menu item, a submenu drops out; when you click again, it disappears.
- Paragraph 1
- Clause 1.1
- Subparagraph 1.2
- Clause 1.3
- Point 2
- Clause 2.1
- Clause 2.2
- Subparagraph 2.3
- Point 3
- Subclause 3.1
- Subparagraph 3.2
- Subparagraph 3.3
I wanted to do it according to the principle - click -> we are looking for a child submenu -> manipulate. But I can not figure out how to do it in an angular.
There is also the ngIf directive, probably in this direction, and you need to think, but again I can not figure out how I can set the display condition for each specific submenu (and not common to all).
Thanks for answers!