我正在尝试在我的 html 上动态更新 facebook 的评论,但是没有显示,请关注我的 Plunker。
可以做什么来呈现评论?
http://plnkr.co/edit/ggt7r0
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.fbComments = '<div id="comentarios" class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-width="100%" data-numposts="5"></div>';
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link href="style.css" rel="stylesheet" />
<script data-semver="1.2.13" src="http://code.angularjs.org/1.2.13/angular.js" data-require="angular.js@1.2.x"></script>
<script src="script.js"></script>
</head>
<body ng-controller="MainCtrl">
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<p><div ng-if="fbComments">
<div ng-bind-html="fbComments"></div>
</div> </p>
</body>
</html>
LO0fC7XWJMts2P