You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Before the ng12Hybrid flag, our wait logic was as follows:
if(window.getAngularTestability){// We are in an ng2 app and should use ng2 testability}else{// We are in an ng1 app and should use ng1 testability}
This causes problems because sometimes, but not consistently, the ngUpgrade API would publish both testability APIs, causing us to use the ng2 testability API, but really we wanted the ng1 testability API (which is what you use in hybrid apps). So we introduced the ng12Hybrid flag to resolve this ambiguity. But was it really ambiguous? Instead we should have just reversed the original logic:
if(window.angular&&!(window.angular.version&&window.angular.version.major>1)){// We are in either an ng1 app or an ngUpgrade app and should use ng1 testability}else{// We are in an ng2 app and should use ng2 testability}
I propose we do the following:
In master, if ng12Hybrid is not set, used the new check (which makes ng12Hybrid needless)
In beta, rebase the above change in and then remove the ng12Hybrid flag entierly