javascript - Using an array of values in Factory -
Currently I have a factory that is using a json file wrapped in $ http.get request. Not ideal, it works for testing. I need to test the same solution within the SharePoint environment, but json files are not allowed, eventually it will be connected to a web API call.
How can I specify the JSON values within the factory to allow for testing?
(function {} PersonalViewFactory = function ($ http) {var factory = {} factory .get customer = function ($ $ http.get ('relationshiptracker.json'); }; Return Factory;}} Individual VIFFracture $ Inject = ['$ Http']; Angular Module ('Client App'). Factory ('Customer Feature', Personal Vffect);} ()); Example of Json [["Segment": "Trading", "Title": "Narima Ajam", "Role": "Oil and Shipping Ability Center Manager", "Last Meeting Date ":" 1/1/2000 "," Next meeting ":" "," created date ":" 9/14/2014 "," revised ":" 9/14/2014 "," Primary account ":" Ajay "Eliine Corkmaz, Carolyn Williams, Karthik Chandrasekhar", "Upcoming Detection": ""}, {"Segment": "Upstream", "Title": "Alison Kenny", "Role", "Betty", "Other Litenges" ":" IM / IT Manager - Bridge; (Nallah) - Br "," Last Meeting Date ":" 8/5/2014 "," Agamematinger ":" "," Date Created ":" 1 / "2/2000", "Modified": "2/15/2014", "Primary Accountability": "Arnold", "Other Litenigrade": "Yero", "Upcoming Detection": ""},]
Comments
Post a Comment