Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image path confusion in Angular2 example

Tags:

angular

Referring to

Plunker

In app.component.ts, imagePath is defined at angular.png, However, in the codebase the image is actually named as angular.base64.png.

 <img [src]="imagePath">

How is the image still appearing ?

like image 645
runtimeZero Avatar asked Jan 16 '26 22:01

runtimeZero


1 Answers

OK consider this,

Q: Can you create a folder named MyImages in given plunker?
A: Yes

Q: How?
A: Cick on the New File, a window popup will be asking for folder name, give it a name like MyImages.

So far so good.

Q: Now how about inserting or adding an image into MyImages folder? Is it possible?
A: I wonder I don't know how.

Note: In plunker adding an image into a folder is not as simple as adding image in windows-7/8/10 (try out yourself and check whether it is that easy?).

So question to your answer is,

.base64.png only shows/indicates base64 encoded file with .png extension. So it is just an image file encoded in base64. That's it.

And rest thing is as simple as using plunker. isn't it?

like image 78
Nikhil Shah Avatar answered Jan 19 '26 19:01

Nikhil Shah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!