2

我正在使用 satellizer 制作注册表单。但它没有转到正确的网址

我的控制台显示以下内容:

POST http://localhost:8000/http://104.236.150.55/auth/register 404(未找到)view2.js:185 未找到

这是我的 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";

}])

和我的控制器:

.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);
            });
        }
    }]);

我如何使用绝对网址访问它们?

4

1 回答 1

4

在您的配置中设置:

 $authProvider.baseUrl = null;
于 2015-05-25T12:20:13.533 回答