I have a directive that listens to some events using the host
property of the @directive
decorator. This works great, but I don't need all events at all times.
For example, I'm only interested in (document: mouseup)
at certain times (namely after a mousedown on my element).
What is the angular way to register and unregister to events dynamically?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…