1

I've put together a little plunker demo to help myself understand the priority and terminal properties of directives, however I'm running into an issue which I don't understand. When setting the terminal property to true, for some reason it seems to stop angular from compiling the html output of scope bound variables, no matter what the priority of the other directives. Is this suppose to happen, and is there any documentation on this?

Note that in the demo the console logs out the values I would expect, but the values in the html don't get compiled ( if terminal is set to false, or removed, they do ).

http://plnkr.co/edit/qGmiGzUmAB4zZ1GgGq7n

Cole Reed
  • 1,036
  • 1
  • 10
  • 12
  • This seems to answer the same question: http://stackoverflow.com/questions/15266840/how-to-understand-the-terminal-of-directive – Raibaz Sep 13 '13 at 17:46
  • That post made sense to me, but I still don't understand why the scoped variables I've set don't show up in the html output. It would make sense to me if only the directives after the terminal priority didn't get converted, but it's all of them no matter which one has the terminal property. – Cole Reed Sep 14 '13 at 02:50

1 Answers1

0

It doesn't stop the compile on the current directive, it does however completely skip all of the directives that come after on the element. So really it has nothing to do with compile.

iConnor
  • 19,997
  • 14
  • 62
  • 97
  • Thanks Pinocchio, but I still don't understand why the scoped variables I've set getting aren't replaced with their actual values? All the directives are on the same element, and no matter which directive I set terminal true on the output never shows up correctly, if I don't set it, or set it to false, they work fine. – Cole Reed Sep 14 '13 at 02:42
  • All the directives are stacked up in the order they apear on the element, if a directive is set terminal true, then all of the other directives that are in the queue will not be rendered – iConnor Sep 14 '13 at 13:54