Passing ajax listener into a component