Skip to content
Advertisement

Why is Vue putting my element body in an attribute?

This is my template for “Guess”:

JavaScript

But the produced HTML looks like this actual output:

JavaScript

Expected output:

JavaScript

Here’s how I’m using the template:

JavaScript

Advertisement

Answer

On your component usage, you injected dependencies just fine as below

JavaScript

then inside this component how do you pickup these dependencies to that you can use em’?… as you’ve guessed, you need props

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