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

Are there any drawbacks for using the ng-upgrade on production? #171

Open HassanBK opened 8 years ago

HassanBK commented 8 years ago

Hi, I read the following article and it claims that using ng-upgrade on production is not recommended.

Keep in mind that the goal of this [upgrade] phase is to stay in it as little as possible, since running both frameworks on the same website is surely not ideal

I am planning to write an angluarJS 2 code along with existing angularJS 1.5 code. And there are no plans to refactor the code of angularJS 1.5 to angularJS 2. So I want to make sure that there are no issues for what I'm going to do. Thanks.

aciccarello commented 8 years ago

The issues is that you are downloading and running two frameworks for one page plus ng-upgrade has to go between and upgrade/downgrade components and services used in both. This could cause some performance degradation but it depends on what you are building. Ideally you would only need one framework.

I've been using the ng-metadata project to write parts of our Angular 1.5 application in an Angular 2 style while still incorporating standard Angular 1 code. If we decide to upgrade to Angular 2 we can refactor the old stuff and upgrade much more easily.

david-gang commented 8 years ago

Hi @aciccarello , Was it hard to migrate from ng-forward to ng-metadata?

Thanks, DAvid

aciccarello commented 8 years ago

@david-gang I never implemented ng-forward. But ng-metadata allows progressively updating from classic ng1 to an ng2 style which was nice. I've been upgrading my code module by module.