D
D
descarado2015-09-15 12:24:18
Angular
descarado, 2015-09-15 12:24:18

How to display a custom directive template using ng-mouseenter?

I'm new to angular, I'll try to be clear.
There is this DOM:

<div ng-controller="MyCtrl">
 <div ng-mouseenter="innerPreview(id)"></div>
 <div ng-mouseenter="innerPreview(id)"></div>
 <div ng-mouseenter="innerPreview(id)"></div>
 /* сюда надо вывести темплейт кастомной директивы с нужными данными */
 <div id="preview" custom-directive></div>
</div>

I understand that any DOM manipulations should be in directives, but how to activate DOM manipulations on mouseenter event? Do I understand correctly that you need to call a certain controller method that pulls a directive that inserts the desired html into the DOM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-09-15
Protko @Fesor

ng-include

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question