Hurry Up, Ends March 14!
Open Closed

Displaying images on Angular UI #8947


User avatar
0
Sandilen created
  • ABP Framework version: v9.0.3

  • UI Type: Angular

  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

  • I am trying to display thumbnail size photos in each row.
    <ngx-datatable-column>
    <ng-template let-column="column" ngx-datatable-header-template>Logo</ng-template>
    <ng-template let-row="row" ngx-datatable-cell-template>
    <img [src]="/image/row['photo']">
    </ng-template>
    </ngx-datatable-column>


2 Answer(s)
  • User Avatar
    0
    erdem.caygor created
    Support Team

    Hello,
    Thank you for reporting this issue! Based on your implementation, it looks like the image source ([src]) is not bound correctly, which may be causing the images not to display.

    Suggested Fix

    Please replace your <img> tag with the following:

    <img [src]="'/image/' + row.photo" width="50" height="50" alt="Photo" />

    Additional Recommendations

    if row.photo already contains a full URL, use:

    <img [src]="row.photo" width="50" height="50" alt="Photo" />

    Let us know if we can assist you further

  • User Avatar
    0
    Sandilen created

    Got sorted Thank you

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08