ngUpgraders / ng-forward

The default solution for those that want to write Angular 2.x style code in Angular 1.x
411 stars 36 forks source link

ngForward as a build step #63

Closed ocombe closed 8 years ago

ocombe commented 8 years ago

Hello !

I like the idea behind ngForward (writing angular 2 code for ng1 is awesome), but I think that it would be more suitable as a build step, maybe as a babel plugin. Do you think that it's something that could be done ?

This way you would write ng2 code, compile & get ng1 code on the otherside, no need to load the ngForward library along with angular.

timkindberg commented 8 years ago

I was thinking of this too, but was unsure that people would like the output. I'm personally not versed in babel plugins :/

ocombe commented 8 years ago

Honestly once you start working with angular 2, you stop looking at the output since typescript is transpiled to ES5 and you don't want to read that. You'd just have to make sure that the build step keeps the source maps accurate (which would be the case with a babel plugin).

I'm not versed into that either, but it looks like a good use case. I'm not sure if that's hard to write, we should summon @sebmck here and ask him :)

ocombe commented 8 years ago

Why did you close this ?

pbastowski commented 8 years ago

Sorry, finger slipped while reading on iphone :)

ocombe commented 8 years ago

okay :P

pbastowski commented 8 years ago

This is a very interesting proposition, actually, to transpile angular2 into angular1.

ocombe commented 8 years ago

Do you see this as a possibility ? I haven't checked out the code yet, so I don't know how it works internally.

pbastowski commented 8 years ago

Possibility, yes. But, I haven't given this idea enough thought yet to say any more.

timkindberg commented 8 years ago

Unfortunately I'm gonna close this. This idea just isn't the short term goal of this project so I know it's not where we are headed. I'm definitely not saying it's a bad idea, I just have to manage the issues and this seems closable.