Get Blog Content


i’m using wordpress API to get title and image to render on index page. the code i used like:

  function getPost(category) { 
     app.request.json("", function(data2) {
    var str2 = "";
      data2.forEach(element => {
        if (element && 
            element.better_featured_image && 
            element.better_featured_image.media_details && 
            element.better_featured_image.media_details.sizes && 
            element.better_featured_image.media_details.sizes.thumbnail && 
          img = element.better_featured_image.media_details.sizes.thumbnail.source_url;
                  str2 += '<a href="/berita/" "li class="item-content ripple">'+
                  '<div class="item-media"><img src="'+img+'" width="44"></div>'+
                  '<div class="item-inner">'+
                    '<div class="item-title-row">'+
                      '<div class="item-title">' + element.title.rendered +'</div>'+
                    '<div class="item-subtitle"><div class="chip">'+
                      '<div class="chip-label">'+category[element.categories[0]]+'</div>'+


It’s works, but my question is
How to render content ’ + content.rendered +’ On my ./pages/news.html ?

anyone can help?
Stuck to get blog post detail

You can use router component page for that blog post where you need to request data and render to page