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