This is my controller for signup, I have successfully signup but I don't know any way to store some additional fields like name, occupation, etc. How can I do that?
controller
app.controller('signupCtrl', function ($http, $scope, toaster, $location, $firebaseAuth) {
var ref = firebase.database().ref();
auth = $firebaseAuth(firebase.auth());
$scope.registerData = {};
$scope.register = function () {
auth.$createUserWithEmailAndPassword($scope.registerData.email, $scope.registerData.password)
.then(function (data) {
$scope.message = "Welcome " + data.uid + ", thanks for registering!";
console.log(data.uid);
}).catch(function (error) {
$scope.message = error.message;
console.log($scope.message);
});
};
});
Do I have to do something in then function or is there already something to handle this ?