setup contract between controller and directive