我從一個JSON這個數據,它的HTML代碼,我怎麼能打印它像HTML,因爲它似乎只打印它作爲一個字符串:我如何處理由Json發送的html代碼?
"content": "Más pruebas\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003e\n\u003ca href=\"https://2.bp.blogspot.com/-CK43Mn516s4/WEmWGS9eoaI/AAAAAAAASg0/k4213387TNA0XInyTNgqaqEn4YYanzCZgCLcB/s1600/Monsters-Inc-Concept-Art.jpg\" imageanchor=\"1\" style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\"\u003e\u003cimg border=\"0\" height=\"174\" src=\"https://2.bp.blogspot.com/-CK43Mn516s4/WEmWGS9eoaI/AAAAAAAASg0/k4213387TNA0XInyTNgqaqEn4YYanzCZgCLcB/s200/Monsters-Inc-Concept-Art.jpg\" width=\"200\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003ca href=\"http://google.com/\"\u003eGoogle\u003c/a\u003e",
我使用angularjs 1.x的
謝謝大家!
你需要使用'JSON.parse ' –
你能提供獲取和打印這個字符串的代碼嗎? –
[AngularJS:將HTML插入視圖]可能的重複(http://stackoverflow.com/questions/9381926/angularjs-insert-html-into-view) – rob