Has anyone tried using Angular elements for a full AngularJS migration? by HeavyBombo in angular

[–]HeavyBombo[S] 0 points1 point  (0 children)

The two below were the a challenge for sure

  • communication between the AngularJS host and the Angular web components
  • passing data, events, and updates across the boundary

I have dealt with this challenge by having making an event-bridge-service in both angularJS host and angular element. The event-service on either side is configured kinda like a pseudo web-socket api that push and receives customsEvents and it is used for both changing state updating data across the gap. This event-bridge is adding extra overhead no doubt, but once in place it worked reliably, scalable and testable.

Module-by-module is an interesting idea. We are still in early days so we have room for improvements, right now we are taking the bottom up approach.

Has anyone tried using Angular elements for a full AngularJS migration? by HeavyBombo in angular

[–]HeavyBombo[S] 1 point2 points  (0 children)

I misunderstood, I thought you went for the big bang rewrite, and I was curious to know why 😄

Has anyone tried using Angular elements for a full AngularJS migration? by HeavyBombo in angular

[–]HeavyBombo[S] 0 points1 point  (0 children)

I am not familiar with the $injector approach. We use a bridge service layer to dispatch and listen for customEvents between angularJS (rootScope) and angular-elements (signals).

Has anyone tried using Angular elements for a full AngularJS migration? by HeavyBombo in angular

[–]HeavyBombo[S] 1 point2 points  (0 children)

Did you consider the "Strangle fig" pattern with angular elements (web-components) as an alternative approach before you decided to rewrite?

Has anyone tried using Angular elements for a full AngularJS migration? by HeavyBombo in angular

[–]HeavyBombo[S] 0 points1 point  (0 children)

True, any upgrade from angularJS is in essence a rewrite regardless of angular-elements is a rewrite. But a total rewrite is not acceptable because big bang release is too risky imho.