I am creating small single page application(SPA) using Angular2 but I am stuck in connecting progress db from angular2 type script.
I will will be great help If someone can please let me know how to connect to progress db from angular 2 script?
Are you looking for ways to connect to the OpenEdge database?
Are you using DataDirect?
I am assuming that your question is about accessing the OpenEdge backend in general. You can use the AppServer (PASOE or Classic AppServer) with REST support.
Please provide more info on this.
There are few options to choose from:
- REST by doing visual mapping of the URLs to classes
- REST by using WebHandlers, where the mapping is done programmatically and with a configuration file.
- OpenEdge Data Service: A REST service using prescriptive approach where the mapping of URLs to classes is done automatically. A catalog.json file is generated with the schema and operations of the resources to access from the JSDO, Kendo UI DataSource and Kendo UI Builder.
Here is a link to a workshop that explains how to create OpenEdge Data Services.
Even though the videos are for working with Mobile from a while back, the concepts are the same.
Check the video for "Exposing OpenEdge Data as REST":
For a simple example using the JSDO, you can take a look at the following example:
The following sample program using Angular also help you:
Please notice that this example uses callbacks via subscribe() for async operations.
The JSDO would use use jQuery promises if available.
I have also posted this information on the other thread.
Please let me know your have specific questions.
I hope this helps.