Skip to content

Commit fcd75ce

Browse files
committed
Changed self to request
1 parent 48e4668 commit fcd75ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,22 @@ function($middlewareProvider)] {
9292
/** It will wait for async requests too! */
9393
'async-auth': ['$http', function asyncAuth($http) {
9494
// We'll need access to "this" in a deeper context
95-
var self = this;
95+
var request = this;
9696

9797
// Grab something from the server
9898
$http.get('/verify')
9999

100100
// The server has responded!
101101
.then(function success(res) {
102102
if ( res.isVerified ) {
103-
return self.next();
103+
return request.next();
104104
}
105105

106-
self.redirectTo('another-state-or-path');
106+
request.redirectTo('another-state-or-path');
107107
},
108108

109109
function fail(err) {
110-
self.redirectTo('another-state-or-path');
110+
request.redirectTo('another-state-or-path');
111111
});
112112
}]
113113

0 commit comments

Comments
 (0)