Topic: Link the image in Angular

Nguyễn Minh Chí free asked 6 years ago


Can you show me How to use <img src="blabla"> , in Angular component, I have tried to link it such as ./img/blabla.png  (my folder in the project), and tried to upload the img to drive and link it with google drive's link, but it didn't run Please help me :D, Thank you

Damian Gemza staff commented 6 years ago

Dear Nguyen, Using images in Angular is same like in pure HTML. Just use tag. For example: <div> <img src="https://mdbootstrap.com/img/Photos/Horizontal/City/6-col/img%20(47).jpg"> If you want to add image from your disk, you have to set corresponding path to it. For example, if your images are located in src/assets folder, your <img src> should looks like follow: <img src="assets/image-name.image-format"> </div> Best Regards, Damian

Nguyễn Minh Chí free commented 6 years ago

Thank you, it has done :D, thank a bunch


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags