added ability to use a ngResource to get data