Add callback to directive