Added support for ngResource, updated controllers