transclude

angular.module('myApp',[])
 .directive('customTags',function () {
        return{
            restrict:'ECMA',
            template:'<div>新数据<span ng-transclude></span> </div>',
            transclude:true,//为true可以插入节点
            replace:true

        }
 })

  

posted @ 2017-10-18 13:16  zhujhhxx  阅读(58)  评论(0编辑  收藏  举报