Here is the code I have written to retrieve all key values using $scope.
$scope.Signup={};
$scope.Message='';
$scope.SubmitPhysicianSignup = function()
{
var url = site_url + 'webservices/physician_signup';
//console.log(url);
var physicianData = {
"user_name_title" : $scope.user_name_title,
"physician_first_name" : $scope.physician_first_name,
"physician_last_name" : $scope.physician_last_name,
"email_address" : $scope.email_address,
"conf_email_address" : $scope.conf_email_address,
"password" : $scope.password,
"confpassword" : $scope.confpassword,
"physician_gender" : $scope.physician_gender,
"physician_dob_date" : $scope.physician_dob_date,
"physician_dob_month" : $scope.physician_dob_month,
"physician_dob_year" : $scope.physician_dob_year,
"physician_profession" : $scope.physician_profession,
"medical_school" : $scope.medical_school,
"traning_year" : $scope.traning_year,
"medical_specialty" : $scope.medical_specialty,
"physician_minc" : $scope.physician_minc,
"physician_country" : $scope.physician_country,
"physician_state" : $scope.physician_state,
"physician_city" : $scope.physician_city,
"physician_address" : $scope.physician_address,
"physician_postal_code" : $scope.physician_postal_code,
"physician_phone_number" : $scope.physician_phone_number,
"physician_default_msg" : $scope.physician_default_msg,
"opt_number" : $scope.opt_number,
};
}
I am looking for ways to minimize the use of $scope and still obtain all key value pairs. Any suggestions?