got controller declaration inside directive to work