Angular5_inter_questions

For answers, please, create separate branch like: "luke_skywalker"

  1. I want a component to listen the “double click” event only if it is ran from a computer. On a tablet or smartphone the component is the same, but it doesn’t respond to this event. How can I do it?

  2. I’ve filled out a form, but before sending it I want to visit another page of the application. How can I save the state information of the form before changing the route? When I come back to its page, how does the form restore its data?

  3. I want two different component to communicate, the user interaction on one changes the state of the other one and vice versa. How can I do it? If I remove (NOT HIDE, all listeners and scopes are deleted) one of the two components, what do I need to do so that there are no errors for the users? And, when it re-appends, how can I know it and update the data?

  4. Please, create an operating Angular component from HTML that produces a DOM, containing another working Angular components.

For all questions please provide code snippets. One answer one separate commit please.