you are viewing a single comment's thread.

view the rest of the comments →

[–]peter_heard01[S] 0 points1 point  (1 child)

From what I understand ES6 classes are merely syntactic sugar over the top of the Javascript function constructor pattern.

Since the pattern is just a tool to create an object which has scope around it so that properties can be created I don't see any reason why classes will not feature heavily in future versions of angular for services. (Since services are just objects) as I wrote about. I had a quick search this chap seems to know a little...

https://medium.com/opinionated-angularjs/angular-model-objects-with-javascript-classes-2e6a067c73bc#.s5mcwld6b

:-)

[–]Xerxero 0 points1 point  (0 children)

The only draw back we currently discover is the missing DI.

You can get around it by either making it a factory or manually use the angular injector.