S
S
Stepan2015-02-05 18:12:46
JavaScript
Stepan, 2015-02-05 18:12:46

(Angular) How to pull out the class and text of the element on which there is a click and paste it into what this click causes?

<div class="new-input" ng-controller="addInput">
        <div ng-repeat="item in items">

            <div class="form-group field-posts-author required has-success">
                <label class="control-label" for="posts-author">Автор</label>
                <input  placeholder="{{item.placehold}}" type="text" id="posts-author" class="form-control" name="Posts[author]" value="Виктор">

                <div class="help-block"></div>
            </div>
        </div>
        <span ng-click="add()" class="subtitle"     >Подзаголовки</span>
    </div>

You need to insert Subtitles in the label, and add subtitle to the div and in other places

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-02-05
Protko @Fesor

ngRepeat.... you don't need to touch the DOM at all to solve your problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question