My App has several views,each view has a controller.
I have several API resources returning standard JSON arrays.Whenever a view changes,the resources are re-queried for new data which is fairly slow. I’d prefer to provide my controllers with the API resources without requerying each time.
Whats the best way to do this?
If I understand correctly then this is what services are for. They’re kind of like a central place for controllers share data.
I looked over the jsfiddle for the code used in this tutorial:
http://onehungrymind.com/angularjs-communicating-between-controllers/
EDIT
For resource calls, I have a service right now that uses them like this. Sorry that its in coffeescript