injecting data from server into scope