Advertisement
Guest User

Untitled

a guest
Jul 18th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $scope.login = function() {
  2. $http({
  3. method: 'POST',
  4. data: {
  5. username: $scope.username,
  6. password: $scope.password
  7. },
  8. url: 'http://127.0.0.1:5000/login/'
  9. }).then(function successCallback(response) {
  10. console.log('successCallback')
  11. }, function errorCallback(response) {
  12. console.log('errorCallback')
  13. });
  14. }
  15.  
  16. XMLHttpRequest cannot load http://127.0.0.1:5000/login/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement