2

I'm making a signup form using satellizer. But it does not go to the right url

My console displays the following:

POST http://localhost:8000/http://104.236.150.55/auth/register 404 (Not Found) view2.js:185 Not found

This is my config.js:

.config(['$routeProvider', '$locationProvider', '$authProvider', function($routeProvider, $locationProvider, $authProvider) {
    $routeProvider

    //for Landing page
        .when('/view2', {
            templateUrl: 'view2/view2.html',
            controller: 'View2Ctrl'
        })
        .when('/activity', {
            templateUrl: 'view2/activity.html',
            controller: 'ActivityCtrl'
        })
        .when('/signup', {
            templateUrl: 'view2/signup.html',
            controller: 'UserCtrl'
        });

    $authProvider.signupUrl = "http://example.com/auth/register";

}])

and my controller:

.controller('UserCtrl', ['$scope', '$auth', function($scope, $auth) {

        $scope.signup = function() {

            var user = {
                email: $scope.email,
                password: $scope.password
            };

            $auth.signup(user)
                .catch(function(response) {
                    console.log(response.data);
            });
        }
    }]);

How do i access them with absolute urls?

Sampada
  • 2,931
  • 7
  • 27
  • 39
user3423235
  • 65
  • 3
  • 9

1 Answers1

4

Set in your config:

 $authProvider.baseUrl = null;
Master Mind
  • 3,014
  • 4
  • 32
  • 63