亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

angular.js - How to dynamically add repeat tags in angular
ringa_lee
ringa_lee 2017-05-15 16:56:15
0
2
593
    <tr ng-repeat="item in data">
        {{item.name}}
    </tr>

How to dynamically add the above string to make it effective and achieve dynamic binding.

The approximate code is as follows

    var str = '<tr ng-repeat="item in data">' + 
            '{{item.name}}' +
        '</tr>';
    angular.element('tbody').html(str)
ringa_lee
ringa_lee

ringa_lee

reply all(2)
Peter_Zhu

http://stackoverflow.com/questions/18157305/angularjs-compiling-dynamic-html-strings-from-database

我想大聲告訴你

What needs to be done by operating dom to load angular tags
Please use ng-if or ng-show to control it.
If you want to operate DOM, please use directive reference: angular coding standards

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template