Connecting Ionic App to telerik backend service

10 posts, 0 answers
  1. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 07 Feb Link to this post

    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 

  2. Martin
    Admin
    Martin avatar
    67 posts

    Posted 10 Feb Link to this post

    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.

     
  3. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 10 Feb in reply to Martin Link to this post

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

     

    Thanks once again.

  4. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 10 Feb in reply to Martin Link to this post

    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?
  5. Martin
    Admin
    Martin avatar
    67 posts

    Posted 15 Feb Link to this post

    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.

     
  6. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 15 Feb in reply to Martin Link to this post

    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.

  7. Martin
    Admin
    Martin avatar
    67 posts

    Posted 17 Feb Link to this post

    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.

     
  8. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 17 Feb in reply to Martin Link to this post

    Thanks Martin

    That's been the issue the whole time.

  9. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 24 Feb Link to this post

    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?

  10. Marcel
    Marcel avatar
    25 posts
    Member since:
    Mar 2015

    Posted 24 Feb Link to this post

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

    Thanks 

Back to Top