javascript - Is it possible to get es6 class constructor arguments list? -
i write services , controllers in app (angularjs - 1.6.3) using es6 classes.
i want simplify piece of code don't know whether it's possible , how es6 class constructor arguments list.
example of piece need simplify prevent duplication:
class myservice { constructor ( $q, $translate, ) { this.$q = $q; this.$translate = $translate; } } angular .module('app') .service('myservice', myservice);
is there way add dependencies given context automatically?
know in angular2 there decorators helps not duplicate dependencies add them in current scope (or other way)
Comments
Post a Comment