如何从innerHtml中删除逗号,来自角度4的JSON的值?图像附加

时间:2018-05-17 06:48:48

标签: angular

JSON响应:

{
            "qno": 1,
            "question": "What is HTML5? And, what are the new features?",
            "answer": [
                "<p>HTML is a markup language designed for processing, defining, presenting and formatting the text. The HTML5 is the latest version and has features like:</p>",
            "<ul class=\"none\"><li>Local Storage</li>",
            "<li>New form elements like date, time, url, range, color</li>",
            "<li>Canvas for 2D drawing</li>",
            "<li>Media elements like audio and video</li>",
            "<li>New semantic elements like, <code>nav</code>, <code>header</code>, <code>footer</code>, <code>section</code> and <code>article</code></li>",
            "<li>Local storage and Session storage instead of cookies.</li></ul>"
            ]
}

使用innerHTML angular 4绑定答案         

        

      See image

enter image description here

1 个答案:

答案 0 :(得分:1)

喜欢这个

var now_Page: Int = 5 /// now 5 pages

for i in now_Page{
    self.dismiss(animated: true, completion: nil) /// back 5 pages
}
检索对象中的数据后,

替换字符串。