Hi G Sambolic,

It strikes me as you do need to do some reading up on OOP 
<http://blog.codinghorror.com/your-code-oop-or-poo/>. It is not the holy 
grail of programming. (oh, there are a whole lot more articles around where 
that came from), but don't take it from me, do your own research.
There are lot of ways you can reuse your code in Angular 1.x, and even more 
in the next version.
It sound to me, that if you have 2 directives that have a need for the same 
abstract code, that that code belongs in a service, along with all other 
business, and async code. Just inject the code in both directives where you 
need them, and your problem is solved. There you have a solutions that is 
loose coupled, and easy testable/maintainable/extendable.  

If you really want to force OOP to angular, it is possible. You can enforce 
all OOP principles if you prefer.  But OOP as you seem to prefer it, is not 
part of javascript. And as a result not part of Angular either. That's a 
good thing. You can write an angular app, and do not need an taxonomie. You 
can write good and reliable apps without one.

With kind regards
Sander



-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to