Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

inject html via template tags js

const person = {
            name: 'Anthony Smith',
            job: 'JavaScript Developer',
            city: 'Los Angeles',
            bio: 'Anthony is a really cool guy that loves to teach web development!'
        }

        // And then create our markup:
        const markup = `
 <div class="person">
    <h2>
        ${person.name}
    </h2>
    <p class="location">${person.city}</p>
    <p class="bio">${person.bio}</p>
 </div>
`;
 
PREVIOUS NEXT
Tagged: #inject #html #template #tags #js
ADD COMMENT
Topic
Name
8+9 =