yeomanyeoman-generator-angularhyperledger-composer

How to edit the text created by Yeoman in hyperledger composer?


asset Vehicle identified by vin{
o String vin
o String vehicleMake
}

In above example, yo hyperledger-composer generates Angular skeleton which uses the asset variables as table headings and form labels as it is i.e. 'vin' and 'vehicleMake' in angular web app. How can this be changed to 'Vehicle Number' and 'Vehicle Make' in angular web app?

I tried changing directly in the Vehicle.component.html and it worked. But when the command is run again, all the changes done directly are overridden. Space cannot be added in code itself, as it gives syntax issues.


Solution

  • The Angular generator doesn't support any round-trip code generation (preserving user edits), so you either need to stabilise your model and then run the generator once (manually making any changes thereafter) or diff the output from the generator and manually apply the changes to your modified code base.