I'm migrating jquery code to AngularJs.
My existing code grabs a list of names from an ajax call, which are then exposed via a get function which returns a list. This list sits in an object called "dataBrowser".
So basically in my existing code I can do:
$.each(this.dataBrowser.getList(), function(key, item)
{
// print table row to html
});
Now I want to display that list in a table using ng-repeat.
My question is, how do I best access dataBrowser.getList() from the controller?
I have a global "application", so I could just grab it via application.dataBrowser.getList(), but I don't like using a global. Should I pass dataBrowser as an object into the controller when I create it?
What's the best approach?