Adds a element directive that uses a controller
Moves the controller logic into the directive