| <!doctype html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <title>Example - example-example59-jquery</title> |
| |
| |
| <script src="../../components/jquery-1.10.2/jquery.js"></script> |
| <script src="../../../angular.js"></script> |
| <script src="script.js"></script> |
| |
| |
| |
| </head> |
| <body ng-app=""> |
| <div ng-controller="FetchCtrl"> |
| <select ng-model="method"> |
| <option>GET</option> |
| <option>JSONP</option> |
| </select> |
| <input type="text" ng-model="url" size="80"/> |
| <button id="fetchbtn" ng-click="fetch()">fetch</button><br> |
| <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button> |
| <button id="samplejsonpbtn" |
| ng-click="updateModel('JSONP', |
| 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')"> |
| Sample JSONP |
| </button> |
| <button id="invalidjsonpbtn" |
| ng-click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')"> |
| Invalid JSONP |
| </button> |
| <pre>http status code: {{status}}</pre> |
| <pre>http response data: {{data}}</pre> |
| </div> |
| </body> |
| </html> |