Assuming my application has a variable "globalFruits" that keeps track of all the "Fruits" within my app.
var globalFruits = {}
globalFruits['Pear'] = {name:'Pear', color:'green'}; globalFruits['Apple'] = {name:'Apple', color:'Blue'};
How should this global variable be included in my AngularJS application such that I can have directives or scopes that can call it and check on its state? Or is that not the AngularJS way?