lundi 31 août 2015

How to prevent loading the same data over and over in angularJS

I have an object that contains some data that I need to load when my application starts. Once its loaded I need to be able to reuse in multiple places on my application.

What is the best way to do this?

Right now I have a factory that I inject into my controller and I pull the data, the problem is that I'm doing the data pull multiple times.

What would be the best way to pull the data only when I load the application? I would only need to access the data on my templates and pull the correct Key Value from the object where I need.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire