Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229351

It possible to make this JavaScript to Typescript?

$
0
0

this code as a .js I want this to work on .ts

document.getElementById(‘container’).appendChild(

slides.reduce((fragment, svg, i) => {
    const span = document.createElement('span');
    span.innerHTML = `
                <p>${slideNames[i]}</p>
                <div>${svg}</div>
            `;

    fragment.appendChild(span);
    return fragment;
}, document.createDocumentFragment())

);

Anyone can help me to solve this problem?
I have no idea to make it.
Thanks.


Viewing all articles
Browse latest Browse all 229351

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>