Skip to content
Rubén Díaz edited this page Jul 4, 2017 · 9 revisions

CobiGen HTML Plug-in

The HTML Plug-in enables merging result HTML files to existing ones. This plug-in is used at the moment for generate an Angular2 client. Currently, the generation of Angular2 client requires an ETO java object as input so, there is no need to implement an input reader for ts artifacts for the moment.

Trigger Extensions

As for the Angular2 generation the input is a java object, the trigger expressions (including matchers and variable assignments) are implemented as Java.

Merger extensions

There are currently two merge strategies:

  • merge strategy html-ng* (add the new code respecting the existing is case of conflict)

  • merge strategy html-ng*_override (add the new code overwriting the existent in case of conflict)

The merging of two Angular2 files will be processed as follows:

Mainly, the merge handles the following nodes types: * md-nav-list * a * form * md-input-container * input * name (for attributes names) * ngIf

Future Work

Take into account that the HTML merger is not generic and only manage the described tags needed for an Angular client. For future version is planned to implement a generic HTML merger.

Clone this wiki locally