Open Closed

ABP Suite generated code breaks if property names ends with ID #10480


User avatar
0
improwise created

At least with Angular (not tried anything else), it seem like the generated code breaks if you name your property something that ends with Id, like ExportedAssignmentId will end up like this ("Id" missing) which is why it did not work with languages files as those had the correct name with Id for keys.

    <ngx-datatable-column
      name="{{ '::ExportedAssignment' | abpLocalization }}"
      prop="Assignment.exportedAssignmentId"

3 Answer(s)
  • User Avatar
    0
    improwise created

    Editor seem to break with markup

  • User Avatar
    0
    improwise created

    If you add missing Id part in Angular it works as expected

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    This behavior was implemented intentionally for the file property type. However, we’ve identified a minor bug that will be addressed in the next patch release. In the meantime, you can either update the templates or apply a manual fix to the generated code.

    If you choose to modify the templates, please follow the steps below: https://abp.io/docs/latest/suite/editing-templates

    // Frontend.Angular.__name@kebab__.component.html.template
    name="{{ '<%= resourceName %>::<%= prop.formControl === 'file' ? removePostfix(prop.name, 'Id') : prop.name %>' | abpLocalization }}"
    

    // Frontend.Angular.__name@kebab__-child.component.html.template
    name="{{ '<%= resourceName %>::<%= prop.formControl === 'file' ? removePostfix(prop.name, 'Id') : prop.name %>' | abpLocalization }}"
    

    I will also process a refund for this ticket. Thank you for your cooperation.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.3.0-preview. Updated on March 13, 2026, 12:51
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.