P
P
PapaDjo2016-03-28 16:45:48
Angular
PapaDjo, 2016-03-28 16:45:48

How to wrap data in a directive in Angular?

I insert a directive

<section data-sticky class="info">
</section>

I need the data inside to wrap in div.class
Now I just insert this div by hand
<section data-sticky class="info">
  <div class="sticky-wrap">

  </div>
</section>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zakharov Alexander, 2016-03-28
@AlexZaharow

There is such a topic in Angular called transclude (I advise you to look at compile as well). With its help, it is indicated [where / in what place of the directive] the nested data should be added. (if you haven't used these terms before)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question