3 ms·
The fact that I can declare a scope variable in a directive and it is magically available in a controller is also another one, only once one starts to dig do th
by kls 11y ago
The fact that I can declare a scope variable in a directive and it is magically available in a controller is also another one, only once one starts to dig do they find out about the less than obvious scope controls to not allow what amounts to global variables. Further down that path, variables can be declared in the template, in the controller or in a directive. There is no traceability of where state starts. Honestly I am the type that blames myself first and think I must be missing something, but there are just such junior mistakes in how Angular was implemented, that it does encourage voodoo.