working example of adding element with directive, and handling event in controller