Skip to content
Advertisement

Vue Component – Passing a prop into a class is not working?

I have a component for a tile where I want to provide the tile title, link name, and icon name via props into the component. This will make it reusable for me to provide the necessary data for multiple pages and links.

I can get the tile title and link name working but I can’t get the icon to show on the tile. As far as I can see on Devtools the string looks correct.

Note – Any feedback you might have on my code layout or use is very welcome!

Home.vue

JavaScript

HomeTile.vue (Component)

JavaScript

Advertisement

Answer

I think this part misses two dots before class

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement