Answer the question
In order to leave comments, you need to log in
How to dynamically insert data into a component?
I understand that jQuery is not cool and I would like to get rid of this
$('.maintext').html($compile(
`
<div>${description}
<a class="greenbtn createbtn waves-effect waves-light btn"
ng-click="processCreate(${id})">
${btnCreatText}
</a></div>
`
)($scope)
);
<div>
<create />
</div>
<div>
/* тут как-то встает описание */
<a class="greenbtn createbtn waves-effect waves-light btn" ng-click="processCreate(/* передаем id*/)">
Создать
</a>
</div>
Answer the question
In order to leave comments, you need to log in
Google for directives. I understand that this is what you need if you are on Angular.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question