0

I have an AngularJS application(say x) which we were using as a directive in our other AngularJS applications before. Now we are using Angular 8 for our new applications and we need to use the same AngularJS component(x). Is there a way to do that without migrating the code of this component x to newer Angular version since the code of this component x is huge. Someone told me to use micro frontend but i couldn't understand how to use that in this scenario.

Any thoughts/suggestions would be greatly appreciated!

Ashu
  • 77
  • 5

1 Answers1

0

One possible way is to transform your Angular 8 application in an hybrid application that can bootstrap each of the Angular and AngularJS parts. To do that your AngularJS app needs to be in 1.5

See this documentation to turn your app in an Hybrid app : https://angular.io/guide/upgrade

Then, you extract your AngularJS directive in a package that can be use in both applications and avoid duplicated code.

And maybe this old topic can help you :) : Use AngularJS directive in Angular Component

anncb
  • 111
  • 6