Javascript 为什么我的ng重复没有';行不通
我试着用angularjs来做这件事,但它保持空白,我不明白为什么Javascript 为什么我的ng重复没有';行不通,javascript,angularjs,Javascript,Angularjs,我试着用angularjs来做这件事,但它保持空白,我不明白为什么 <title>The W3.CSS Example</title> <body ng-app ng-init="app='accordion'"> <div class="w3-accordion w3-light-grey"> <div ng-repeat= "section in sections" ng-init="sections=['sect
<title>The W3.CSS Example</title>
<body ng-app ng-init="app='accordion'">
<div class="w3-accordion w3-light-grey">
<div ng-repeat= "section in sections" ng-init="sections=['section 1','section 2']">
<button onclick="myFunction('Demo1')" class="w3-btn-block w3-left-align">
Open Section 1
</button>
<div id="Demo1" class="w3-accordion-content w3-container">
<p>Some text..</p>
</div>
</div>
</div>
</body>
W3.CSS示例
开放式第一节
一些文字
在调用ng repeat之前,必须先初始化部分
<div ng-init="sections=['section 1','section 2']">
<div ng-repeat= "section in sections">
<button onclick="myFunction('Demo1')" class="w3-btn-block w3-left-align">
Open Section 1
</button>
<div id="Demo1" class="w3-accordion-content w3-container">
<p>Some text..</p>
</div>
</div>
开放式第一节
一些文字
在调用ng repeat之前,必须先初始化部分
<div ng-init="sections=['section 1','section 2']">
<div ng-repeat= "section in sections">
<button onclick="myFunction('Demo1')" class="w3-btn-block w3-left-align">
Open Section 1
</button>
<div id="Demo1" class="w3-accordion-content w3-container">
<p>Some text..</p>
</div>
</div>
开放式第一节
一些文字
根据本例,我有init,但与ng repeat在同一行,但似乎我必须将其放在upper div以使其工作我有init,但与ng repeat在同一行,根据本例,但似乎我必须将其放在upper div以使其工作