jlorenzoC / FizzBuzz

It's an Angular app which displays the numbers between 1 and 100 but using FizzBuzz algorithm's way. Also, it's test covered.
https://jlorenzoc.github.io/FizzBuzz/
0 stars 0 forks source link

Fizz and buzz images are not shown :( #1

Closed milyiyo closed 3 years ago

milyiyo commented 3 years ago

Hi @jlorenzoC,

Maybe this is something that happens only to me, but I cannot see the images of the drink and buzz :)

Check this screenshot:

image

jlorenzoC commented 3 years ago

Hi @milyiyo, thanks for comment 😃. I solved it but I haven't published it yet (also doing some refactoring). Well, certainly it has to be with the way the pics are referenced when the project gets built in development environment mode, and when it gets built for production due my configs.

As you can see in that screenshot the app is trying to reach the pics at /assets/.. whereas the fact is that, when the project gets built for prod., the assets folder is created under this new folder called fizzbuzz, so in this scenario the correct url should be /fizzbuzz/assets/...

I worked around and solved this using environment variables provided by environment.ts and environment.prod.ts files. Maybe there are others solutions to this, tho. but I decided to stick with this one in order to not find me myself touching others angular behind the scenes configs files. Here at the Angular docs more info related.

I'll post some updates soon, so you can see the pics of the drinks and the others haha 😃. I'll let you know when it's done.