-2

In nrwl schematics different apps are created:

  • Faculty
  • Organization
  • Students

There's one functionality (lib) say, "createStudents" which is in Students app and the same functionality needs to be implemented in Faculty app, for this there are two approaches:

  1. Copy the createStudents lib into the Faculty app.
  2. Redirect to Students app from Faculty.

As the first approach would duplicate the code, can we use second approach and how to implement? For second approach I followed below URL but it's not working: https://medium.com/@tomastrajan/why-and-how-to-lazy-load-angular-libraries-a3bf1489fe24

sabin
  • 841
  • 12
  • 15

1 Answers1

1

You should add the createStudents to a shared module in the libs folder, which can then be imported by either app.

chrismclarke
  • 1,995
  • 10
  • 16