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

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -