I am using $ionicAuth service that deals with registration and logging in/out. I followed this tutorial https://docs.ionic.io/services/auth/#emailpassword-authentication and https://docs.ionic.io/setup.html - for setting up ionic cloud and using the services. When I try to register, I get this error - $ionicAuth.signup is not a function.Please help me to fix this.
$scope.register = function(){
$scope.error = '';
$ionicAuth.signup($scope.registerData).then(function() {
// `$ionicUser` is now registered
$ionicAuth.login('basic', $scope.registerData).then(function(){
$state.go('login');
});
}, function(err) {
var error_lookup = {
'required_email': 'Missing email field',
'required_password': 'Missing password field',
'conflict_email': 'A user has already signed up with that email',
'conflict_username': 'A user has already signed up with that username',
'invalid_email': 'The email did not pass validation'
}
$scope.error = error_lookup[err.details[0]];
})
}