模板angularjs的动态插入指令

时间:2016-01-10 12:51:35

标签: angularjs angularjs-directive

我有疑问,可以:动态插入指令到模板,例如:

<div class="col-md-3" ng-repeat="r in result">

  <span {{r.directive}}></span> //when restrict:"E", r.directive is directive name

</div>

OR

<div class="col-md-3" ng-repeat="r in result">

    <span class="{{r.directive}}"></span> //when restrict:"C"

    </div>

0 个答案:

没有答案