This repository was archived by the owner on Jul 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
UI/WEB/Views/GeneratorTemplates/Angular2 Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1111
1212 <div class =" row" >
1313 <div class =" col-sm-6 col-md-8" >
14- <a [routerLink] =" [ '/{{ camel_case ( $gen -> entityName () ) } } /create' ]" class =" btn btn-primary" >
14+ <a [routerLink] =" [ '/{{ $gen -> slugEntityName ( ) } } /create' ]" class =" btn btn-primary" >
1515 <i class =" glyphicon glyphicon-plus" ></i >
1616 <span translate >{{ $upEntity } } .create</span >
1717 </a >
Original file line number Diff line number Diff line change 1717
1818 public constructor(
1919 private actions$: Actions,
20- private {{ $service = $camelEntity . ' Service' } } : {{ $entitySin } } Service,
20+ private {{ $service = camel_case ( $entitySin ) . ' Service' } } : {{ $entitySin } } Service,
2121 private formModelParser: FormModelParser
2222 ) { }
2323
3737 .ofType({{ $actions } } .ActionTypes.GET_{{ $gen -> entityNameSnakeCase () } } _FORM_MODEL)
3838 .switchMap(() => {
3939 return this.{{ $service } } .get{{ $gen -> entityName () } } FormModel()
40- .map((data) => this.formModelParser.parse(data, ' {{ strtoupper ( $gen -> entityName ()) } } .fields. {{ camel_case ( $gen -> entityName ( true )) } } .' ))
40+ .map((data) => this.formModelParser.parse(data, this. {{ $service } } .fieldsLangNamespace ))
4141 .map((data) => { return new {{ $actions } } .GetFormModelSuccessAction(data)})
4242 .catch((error) => {
4343 error.type = 'danger';
Original file line number Diff line number Diff line change 1414export class {{ $entitySin } } Service extends Service {
1515
1616 protected API_ENDPOINT: string = '{{ str_slug ($gen -> tableName , $separator = " -" ) } } ';
17- protected langNamespace: string = '{{ strtoupper ($gen -> entityName ()) } } ';
17+ public langNamespace: string = '{{ $gen -> entityNameSnakeCase () } } ';
18+ public fieldsLangNamespace: string = '{{ $gen -> entityNameSnakeCase () } } .fields.{{ $gen -> tableName } } .';
1819
1920 public constructor(
2021 private http: Http,
You can’t perform that action at this time.
0 commit comments