AngularJSを使用してストリームで表示する各記事の下部に、複数の展開/折りたたみボタンを作成します。 これは私のページの構造は次のようになります。Expand AngularJSの折りたたみボタン
<h1>Heading of the Page</h1>
<div class="item-content-wrapper">
<div class="item-content-block">
<article id="item-content" class="item-content">Some very long text goes here.
</article>
</div>
<div class="action-bar-wrapper">
<div class="action-bar">
<div class="action-button">
<icon name="expand">E</icon>
</div>
<div class="action-button">
<icon name="share">S</icon>
</div>
</div>
</div>
(どこかのjQueryを使用しないでください)私は複数のitem-content-blocks
を持っていると私はAngularJSを使用して、各ブロックを展開したり折りたたんだりします。 同じクラス名とすべてのブロックが複数存在するため、スケーラブルなコードが必要になります。
私はちょうどAngularJSで始まっているので、どんな助けにも感謝します。ありがとう!