标签:ring replace dsr html code link watch ams word
html
: <embed embed-src="...">
app.directive(‘embedSrc‘, function () {
return {
restrict: ‘A‘,
link: function (scope, element, attrs) {
var current = element;
scope.$watch(function() { return attrs.embedSrc; }, function () {
var clone = element
.clone()
.attr(‘src‘, attrs.embedSrc);
current.replaceWith(clone);
current = clone;
});
}
};
})
标签:ring replace dsr html code link watch ams word
原文地址:http://www.cnblogs.com/zyzhao/p/6687524.html