ajax angular adapter improvement and updated sample