This is a migrated thread and some comments may be shown as answers.

Connecting Ionic App to telerik backend service

9 Answers 84 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcel
Top achievements
Rank 1
Marcel asked on 08 Feb 2016, 03:05 AM

Ive been trying to figure out for a week now how to get my login and registration forms to work and connect to telerik database.

Doesnt anyone have step by step directions?

 

thank you 

9 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Feb 2016, 12:52 PM

Hi Marcel,

You can check out this blog post where it is explained how to connect Ionic app with Telerik Backend Services.

You can check a ready example from the post here. Have in mind that it is a little bit rough but it will help you to grasp the initial idea. For instance in the project you can see:
- The login form
Performing the login action when the user submits the login form (line 52)
- Login function (line 33)

Make sure to add your appId for Telerik Platform in services.js (as an apiKey).

To get started quickly with Telerik Backend you can also check the Getting Started with the Backend Services JavaScript SDK as well as User Management with Telerik Backend Services.

Hope this helped.

Regards,
Martin
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Marcel
Top achievements
Rank 1
answered on 11 Feb 2016, 03:52 AM

Thanks Martin for your help, I think I may have finally figured out what the issue was.

 

Thanks once again.

0
Marcel
Top achievements
Rank 1
answered on 11 Feb 2016, 04:15 AM
also one more question. with the registration login form I know its a bit of the same process but a little more thats involved right?
0
Martin
Telerik team
answered on 15 Feb 2016, 12:41 PM

Hi Marcel,

For register you take again the input of the user with a form (with username and password fields). You can also take additional information/attributes for the user (like email and display name, etc.).

You can see in the example the steps needed:

You can also register the users with their Facebook, Google or Microsoft account. Detailed information about registering users can be found here.

Let me know if you need more help.

Regards,
Martin
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Marcel
Top achievements
Rank 1
answered on 16 Feb 2016, 01:33 AM

Hey Martin, thanks for your help.

I actually dont have a problem with the registration form, I have an issue with getting the (state.go) to switch  pages when submitting a new registration form.

0
Martin
Telerik team
answered on 17 Feb 2016, 02:42 PM
Hi Marcel,

I am assuming you are looking at the Pantry-App example. In the Pantry-App the navigation with state.go is executed in the success callback of the register function. Probably you are entering the error callback and that is why the state.go is not executed.

Remove "status" in controller.js (line 81) - this may be the reason why you are not seeing an alert with the error message. The line should look like this:
title: data.message,

You may also do the following to ensure that you are not getting an error response:
1. Enable Users
2. Check that you have entered in services.js (line 5) your api_key.

Let me know if this has worked for you.

Regards,
Martin
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Marcel
Top achievements
Rank 1
answered on 18 Feb 2016, 12:14 AM

Thanks Martin

That's been the issue the whole time.

0
Marcel
Top achievements
Rank 1
answered on 24 Feb 2016, 09:47 AM

Hello Martin,

I stuck at a dead end again, Everytime I insert the "User" function from service.js into .controller i navigate on the stimulator but I cant do anything on an actually device.

 

Do you know what could be the issue?

0
Marcel
Top achievements
Rank 1
answered on 24 Feb 2016, 08:58 PM

I've actually figured out that it was a script issue.

Thanks 

Tags
Apache Cordova
Asked by
Marcel
Top achievements
Rank 1
Answers by
Martin
Telerik team
Marcel
Top achievements
Rank 1
Share this question
or