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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -