Paulo Fraga
Posts: 0
Joined: Sun Nov 08, 2015 9:26 pm

Data inserted wihout any value to the database

Hello, i'm new in the app develop and i'm testing a project with ionic and angularJS.

I have a screen with three input: name, email and password, and a button to save in the database.

In the database i have a collection called user with the columns: name, email, password.

In the scope i created three variables: name, email, password
I created a function: registerNewUser and put in the ng-click of the button.

The function code:

var requestData = {};
requestData = (function mapping8975($scope){
var requestData = {};
requestData.data = Apperyio.EntityAPI('myDB_users_create_service.request.body', undefined, true);

Code: Select all

 var name_scope = $scope.name; 
 var email_scope = $scope.email; 
 var password_scope = $scope.password; 
 requestData.data.name = name_scope; 
 requestData.data.email = email_scope; 
 requestData.data.password = password_scope; 

 return requestData; 

})($scope);

Apperyio.get("myDB_users_create_service")(requestData).then(

Code: Select all

 function(success){ 

 }, 
 function(error){ 

 }, 
 function(notify){ 

 }); 

When i click in the button a new register is created in the database, but there is no data inside the fileds.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Data inserted wihout any value to the database

Hello,

Could you clarify have you changed anything on the Source tab? This (http://devcenter.appery.io/tutorials/...) doc should help.

Paulo Fraga
Posts: 0
Joined: Sun Nov 08, 2015 9:26 pm

Data inserted wihout any value to the database

Hello, thanks for the reply.

Please let me know where to find some tutorial / video that shows a guide on how to insert, update and delete data in a database using some input filds with AngularJS + Ionic.

regards,
Paulo Fraga.

Return to “Issues”