Skip to content

howto_angular client generation

Rubén Díaz edited this page Sep 25, 2017 · 39 revisions

Angular4 Client Generation

The generation can create a full Angular4 client using the oasp4js-application-template package located at workspaces/examples folder of the distribution. For more details about this package, please refer here.

You have to have into account that the TypeScript merging using CobiGen needs Node 6 or higher to be installed at your machine.

Pre-Requisites

Having installed yarn as global:

npm install -g yarn

Step 1: Angular4 workspace

Copy from workspaces\examples of your DevonFW distribution the oasp4js-application-template folder into the root of your oasp4j project parent folder.

root/
 |- oasp4js-application-template/
 |- oasp4j-project-parent/
   |- core/
   |- server/

Step 2: Install Node dependencies

Open a terminal into oasp4js-application-template copied and just run the command:

yarn

This will start the installation of all node packages needed by the project into the node_modules folder.

Step 3: Generating

From an Eto object, right click, CobiGen → Generate will show the CobiGen wizard relative to client generation:

CobiGen Client Generation Wizard

Check all the increments realtive to Angular:

CobiGen Client Generation Wizard2
Note

The Angular OASP4J URL increment is only needed for the first generation however, checking it again on next generation will not cause any problem.

Clone this wiki locally