Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing the sample app

  • Loading branch information...
commit 9ae4ed69bc72f726163a9e554d074a6fefb9808b 1 parent fce0f4a
@dncrews dncrews authored
Showing with 6 additions and 4 deletions.
  1. +3 −0  sample/public/index.html
  2. +3 −4 sample/public/js/my_app.js
View
3  sample/public/index.html
@@ -14,6 +14,9 @@ <h1 data-ng-bind="text"></h1>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
+ <script>
+ window.FS = {};
+ </script>
<script src="js/fs-superagent.js"></script>
<script src="js/my_app.js"></script>
<!--
View
7 sample/public/js/my_app.js
@@ -3,18 +3,17 @@
var module = ng.module('ngSuperagent', []);
- fsSuperagent.angular(module);
+ fsSuperagent(module);
module.controller('fsSuperagentController', [
"$scope",
function($scope) {
$scope.fireWithFS = function() {
- var FS = {
- superagent : fsSuperagent.obj()
- };
FS.superagent
.get('/sample/fs')
+ .set({'something': 'nothing'})
+ .set({'accept': 'application/json,text/html'})
.end(function(err, response) {
if (err) return console.error('err', err);
alert(response.text);
Please sign in to comment.
Something went wrong with that request. Please try again.