sidebar to directive, instead of controller