nghellostyle
nghellostyle copied to clipboard
directives share same object
All works fine, until we use a directive multiple times on a site. Directive.factory will only be called once. So all directives on sites share the same Directive object.
I believe Angular factories are singletons, so will be called only once regardless of the context in which Angular is running. It's the link and controller functions that will be called multiple times and I don't see anything in the code that would prevent this. But I've only just skimmed it so I might have missed something.