passing data to/from directive