2つの$ http(.post)要求をどのように連結して、もう一方を呼び出すことができますか? これは機能していないような私の機能です。
$scope.signup = function() {
console.log("New user");
$http.post('/signup',{
email: this.email,
password: this.password
}).then(function success($http){
return $http.post('api/userData/init'); //error
}).then(function redirect($state){
return $state.go('profile');
});
}
エラーは何ですか?あなたは2番目のポストでコールバック関数が必要です。 '.then(function success($ http){...' –