D
D
DarthJS2016-03-01 16:02:13
Angular
DarthJS, 2016-03-01 16:02:13

What is the correct and best way to hide elements in Angular?

There are elements, such as directives or just parts of html, that appear when a link is clicked (let's call it 'Display' and the method " toggle()", which changes the true/false flag), respectively, and hide when the same link is clicked. Actually used ng-if/ng-show/ng-hide
It turns out that when you go to another page (another controller or the same one), the previously opened area will not be hidden, rootScopeyou don’t want to use it, and it’s also not a good idea to shove flags into each controller, since there can be many areas, and controllers too lot.
Please suggest some good options for this situation.
I hope I explained clearly, I will be happy to answer questions

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question