簡體   English   中英

動態生成的代碼H1無法正常工作

[英]Tag H1 is not working properly when dynamically generated

$scope.html = [{
    "name": "teste",
    "data": [{
        "tag": {
            "name": "h1",
            "text": "Titulo 1",
            "colValue": "col-xs-12"
        }
    }, {
        "tag": {
            "name": "text",
            "colValue": "col-xs-4"
        }
    }, {
        "tag": {
            "name": "h1",
            "text": "Titulo 2",
            "colValue": "col-xs-12"
        }
    }, {
        "tag": {
            "name": "text",
            "colValue": "col-xs-4"
        }
    }, {
        "tag": {
            "name": "text",
            "colValue": "col-xs-8"
        }
    }]
}, {
    "name": "teste",
    "data": [{
        "tag": {
            "name": "h1",
            "text": "Titulo 3",
            "colValue": ""
        }
    }, {
        "tag": {
            "name": "text",
            "colValue": "col-xs-4"
        }
    }]
}];

我在使用javascript (角度)和bootstrap創建動態表單時遇到一些問題。 這個想法是動態創建html標簽。

我的問題: h1不能正常呈現時, h1 > 1,這不是跳到下一行。

首先在這里看看: http : //jsfiddle.net/92z54z04/951/

它需要像這樣:

在此處輸入圖片說明

class=col-xs-12到內部ng-repeat中:

<div class="col-xs-12" ng-repeat="(i, t) in h.data">

http://jsfiddle.net/92z54z04/957/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM