I have written some services for my ionic mobile app (which is in javascript - ecma6
). Now i need to reuse that code in a web app which is written in typescript
.
The idea which i had was, compiling es 6
script to es 5
and then use it inside typescript but in this approach i will loose angular's dependency injection and other features i guess.
So the question is, how can i reuse code written in javascript - ecma6
in typescript
.
Any pointers to the right direction would help.
static get parameters() {return [[Controller]]; }
– Cerlin Boss Jun 8 at 5:09