- angular.module('app').directive('originalhtml', function() {
- return {
- restrict : 'EA',
- replace : true,
- transclude : true,
- scope : {
- content : '@content'
- },
- template : '<div></div>',
- link : function(scope, element, attrs) {
- element.html(scope.content.toString());
- }
- }
- });
- //该片段来自于http://www.codesnippet.cn/detail/1112201411250.html
来源: http://www.codesnippet.cn/detail/1112201411250.html