I am trying to display a image in tutorial app using C8Y Command Line Tool

Screenshot 2023-04-24 170339
I am not able to display the image in tutorial app as it does not have assets folder in it

Hi Rushikesh, you may try the following approach, assuming you have assets folder with image.png file:

in package.json add copy with the list of paths you would like to include, for example:

{
  "name": "tutorial-application",
  (...)
  "c8y": {
    "application": {
      "name": "tutorial application",
      "contextPath": "tutorial-application",
      (...)
      "copy": [
        "assets"
      ]
    }
  }
  (...)
}

and then in your template:

<img [src]="'image.png'">

Such an image should be displayed both during local development as well as in the deployed app.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.