내 데이터베이스에는 제품 정보가 저장되며 많은 정보가 목록으로 구성되어 있습니다. 데이터를 Angular에 $scope.post
으로로드합니다. AngularJS - 문자열에 포함 된 HTML 태그 렌더링
$scope.post.size_description = '<li> Fits true to size. Take your normal size\r</li>
<li> Slim-cut, mid-rise style</li>
<li> Long in length, alter to fit</li>
<li> Model wears an IT 48\r</li>
<li> Model measures: waist size 32, height 6\'1"/ 185cm\r</li>'.
내 각도 응용 프로그램에이 데이터를로드하려고
, 그것은합니다 (<li>
이 구문 분석되지 않습니다 즉) 텍스트로 렌더링됩니다 예를 들어
. 이 문제는 보안상의 이유로 발생하는 것으로 알고 있지만 해결 방법이 있습니까?
중복 가능성 [뷰에 삽입 HTML 사용 AngularJS와 (http://stackoverflow.com/questions/9381926/insert-html-into-view-using-angularjs) –
보세요 : http://docs.angularjs.org/api/ng.$compile – Cherniv
보다 완벽한 답변을 찾았습니다 : [link] (http://stackoverflow.com/questions/9381926/insert- html-into-view-using-angularjs) – gianlucabr