A
A
Aleksei Podgaev2013-11-29 00:58:18
JavaScript
Aleksei Podgaev, 2013-11-29 00:58:18

AngularJS and OOP: how to implement inheritance/polymorphism?

I'm doing a fairly large project, which has a lot of complex data models with relationships, etc. To access and read from the database, I create models in the form of services. Inside the services, of course, everything is through $resource. After writing the next service, the understanding came that it was necessary to somehow unite the common functionality. I don’t know much about javascript yet, so the question arose whether it was possible to create something in the spirit of OOP using Angular. For example, one abstract service with a set of interfaces, and each of the models will already implement it in its own way. As far as I understand, javascript itself is not very OOP-oriented, but still, who can advise what?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EugeneOZ, 2013-12-05
@alexiusp

buff.ly/18hEXAs here may be of interest to you

E
EugeneOZ, 2013-11-29
@EugeneOZ

Hash objects can be "inherited" using angular.extend

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question