Hi there,
I have been trying to reproduce the Ionic Creator tutorial for user authentication with Ionic Cloud, unsuccessfully…
Even when copying source code for github.usecreator.com.
For instance, if we have a look at the signup form:
-
I created a signup form with 3 components: email input (ng-model=“data.emaill”), password input (ng-model=“data.password”) and submit button (ng-click=“signup”)
-
I include the Ionic Cloud and referenced the ID of my app
-
coded the following in my signup controller
function ($scope, $stateParams, $ionicAuth, $ionicUser, $state) { $scope.data = { 'name': '', 'email': '', 'password': '' }; $scope.error=''; $scope.signup = function(){ $scope.error = ''; $ionicAuth.signup($scope.data).then(function() { // `$ionicUser` is now registered $ionicAuth.login('basic', $scope.data).then(function(){ $state.go('menu.home'); }); }, 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]]; }); };}
When I preview and click the signup button nothing happens and no error is display (I added an error label to display the $scope.error variable).
I wanted to display the Google Inspector to see if something is happening in the background but it looks like nothing happens in the Network tab…
Any idea of what could be wrong or even how I could debug this?
Thanks a lot,
Manuel