Ionic-framework: Reuse an angular 1 module - support for UpgradeAdapter

Created on 6 Sep 2016  路  3Comments  路  Source: ionic-team/ionic-framework

Short description of the problem:

I would like to reuse an angular 1 module (library-like, mainly services) in a Ionic2 app.

I have read about the upgrade module and its UpgradeAdapter service in angular 2 docs.

[...] service that can bootstrap and manage hybrid applications that support both Angular 2 and Angular 1 code.

In order to use the UpgradeAdapter service, its bootstrap function should be called.

Knowing that Ionic2 also requires to call a bootstrap function ionicBootstrap, I am wondering if it exposes a way to use the UpgradeAdapter bootstrap instead of the standard angular 2 one.

So question is: do you plan to support UpgradeAdapter ?

Other information:

Which Ionic Version? 2.x

Most helpful comment

@jgw96 Could you please comment on this ? I don't understand why running angular1 on top of Ionic2+angular2 implies running Ionic1. Thank you.

All 3 comments

Hello! At this time we are not planning on supporting ngUpgrade or the upgrade module in Angular 2 for Ionic 2. This involves running both Angular 1 and Angular 2 at the same time, which would also mean running Ionic 1 and Ionic 2 at the same time, which can lead to wonky performance, un-needed complexity and more. Sorry if this causes any hassle for you and thanks for using Ionic!

I don't get the running Ionic 1 and Ionic 2 at the same time? I could easily integrate another framework into Ionic 2, besides NG2, why not simply NG1? So why do you need to run Ionic 1? Can you please elaborate on that a bit?

@jgw96 Could you please comment on this ? I don't understand why running angular1 on top of Ionic2+angular2 implies running Ionic1. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexbainbridge picture alexbainbridge  路  3Comments

daveshirman picture daveshirman  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments