javascript - AngularJS $http.get isn't working -
I have a static json file, which is at http: ///test.json, which I Can see ok
I am trying to use $ http.get to load that Jason file. Here is my code:
testApp.run (function ($ http) {$ http.get ("test.json") .success (function (data, position, headers, config) { Warning ("ya!");}). Panic (function (data, position, header, config) {warning ("failed!");});}); Any suggestions? Definitely being said because it is warning me that it should be easy, but it is driving me crazy. Try it with
/ URL for this type of GET method: $ http.get ("/ test.json"). Success (function (data, position, header, config) {warning ("ya!");}). Terror (function (data, position, header, config) {warning ("failed!");}); });
Comments
Post a Comment