changed directives to be in controller file