Closed Ni55aN closed 7 years ago
Using &attributes({'node!':''})
added attributes for direct directives, but got another problem: the error Directive not found: node!
occurs if one of the variables in the template matches the name of the directive
<div al-repeat='node in editor.nodes'>
<a node!></a>
</div>
Of course I can rename directives, but it would be better to have a more obvious solution
$ns was deprecated in 0.14 alight.directives is place for "global" directives per alight (per instance).
I didn't get what exactly you try to do, so I made a few examples: https://jsfiddle.net/myo7aa6q/ - the same directive, but different data for different elements https://jsfiddle.net/hj6sa0et/ - different data with own directives inside https://jsfiddle.net/9Lajz39g/ - clones of alight https://jsfiddle.net/j5pr2dy6/ - one of the way to change syntax ( changed directive! -> @@@directive )
@lega911 tranks, but how to use ChangeDetector with alight()
? I need to call scan()
from outside
var changeDetector = alight(element, data);
Thank you!
I use version 0.14. It does not work $ns, and I can not use direct directives either, because the symbol "!" is not allowed at the end of tag name (Pug simply uses it for its own purposes and trims it).
I make the binding as follows:
For each bind() there must be directives with unique data (in my case I pass
this
) How can I pass in the directives unique data used by differentbind()
?