S
S
Stepan2015-02-12 15:16:11
JavaScript
Stepan, 2015-02-12 15:16:11

How to make blocks appear one under one from below with ng-repeat?

So far, they are displayed not against each other, but in the order in which they stand

<div ng-repeat="item in wysi" class="form-group">
            <div class="{{'field-postdata-' + item.type + ' reqwired'}}">
            </div>
        </div>

        <div ng-repeat="item in subtitle"  class="form-group">
            <div class="{{'required field-postdata-' + item.type}}">
            </div>
        </div>

        <span ng-click="addWysi(); removeDOM()"    >Редактор</span>
        <span ng-click="addSubtitle();removeDOM()">Подзаголовки</span>
</div>

Conditionally displayed like this
Editor
Subtitle
Editor
Subtitle
If you need 2 editors in a row, then it outputs something like this
Editor
Editor
When I then click "Subtitle" it inserts it between these two editors.
Where did I go wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Dedukhin, 2015-02-12
@Demetros

I didn't understand a word of your question. Can you be more specific?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question