Move PanelController to a custom element directive