How to inject custom service to angular component in plain ES5 (Javascript)?
I have a working angular2 Componen t. I implemented a class for some service (using ng.core.Class if that matters). What are the minimal steps to inject my service to my Component ? Should I include my service in bootstrap function? Should I use any of ng.core.Inject or ng.core.Injectable? All my experiments failed so far. You can do it super simple. Just create a class an pass it through providers property or through bootstrap For example // Alternative 1 var Service = ng.core.Class({ constructor : function() {}, someFunction : function() { console.log('Some function'); } }) // Alternative 2