How to make satellizer use absolute url's?-open source projects sahat/satellizer
I’m making a signup form using satellizer. But it does not go to the right urk
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?