Git Product home page Git Product logo

Comments (6)

wissam-khalili avatar wissam-khalili commented on August 15, 2024

Hi there,

Thank you for your input.
We will review this issue on our side.

Regards,
Wissam

from frontend-frameworks.

atdcloud avatar atdcloud commented on August 15, 2024

Hi @BechkoB,
I've forked our sample repo and set the angular core and Cloudinary Angular SDK to the latest version without any issues:
codesandbox.

Here are my dependencies:

 "dependencies": {
    "@angular/animations": "17.0.4",
    "@angular/common": "17.0.4",
    "@angular/compiler": "17.0.4",
    "@angular/core": "17.0.4",
    "@angular/forms": "17.0.4",
    "@angular/platform-browser": "17.0.4",
    "@angular/platform-browser-dynamic": "17.0.4",
    "@angular/router": "17.0.4",
    "@cloudinary/ng": "^2.0.0",
    "@cloudinary/url-gen": "^1.13.0",

In addition, version 16 and up should be supported: https://github.com/cloudinary/frontend-frameworks/tree/master/packages/angular#version-support

If you're still having an issue, can you please set a code sandbox and share the link with us?

from frontend-frameworks.

BechkoB avatar BechkoB commented on August 15, 2024

Hi @atdcloud here is the sandbox which crashes too:
https://codesandbox.io/p/devbox/bold-goldstine-qz3rsr?file=%2Fsrc%2Fapp%2Fapp.component.html%3A19%2C62

it works when you use the tag like that : <advanced-image [cldImg]="img"> , but when try to get the image through a method it crashes because sends a hundreds of requests to cloudinary

from frontend-frameworks.

jroco-cloudinary avatar jroco-cloudinary commented on August 15, 2024

Hi @BechkoB, the advanced-image component does not support a function in cldImg. Please check this out as a reference:

from frontend-frameworks.

BechkoB avatar BechkoB commented on August 15, 2024

Hello, @jroco-cloudinary Thanks, so what could be the best solution to use it inside *ngFor , for example I have an array of categories and icons for them, where I need the icons from cloudinary ?
<mat-list>
<mat-list-item *ngFor="let category of categories$ | async">
<a>
<advanced-image [cldImg]="category.icon.publicId"></advanced-image>
<span class="flex-1 category-title">{{ category.title }}</span>
</a>
</mat-list-item>
</mat-list>

from frontend-frameworks.

jroco-cloudinary avatar jroco-cloudinary commented on August 15, 2024

Hi @BechkoB,

I modified your code and added elements that loop through an object. Please see here: https://2l2gln-4200.csb.app/

Basically, I declared an array of CloudinaryImage in the app.component.ts.

imgList: Array<{ myImage: CloudinaryImage }> = [];
  constructor() {}

Then loop through it in the app.component.html.

<table>
  <thead>
      <th>My Images</th>
  </thead>
  <tbody>
      <tr *ngFor="let category of imgList">
        <advanced-image  [cldImg]="category.myImage"></advanced-image>
      </tr>
  </tbody>
</table>

Please let me know if this works for you.

from frontend-frameworks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.