Get entity controller and directive

Description:
This is very experimental. Directives within a 'pre' tag are not responding to click events. The work done here is an attempt at troubleshooting that problem.