2

If you have two angular-cli projects in one solution, is it possible to import components/modules into the angular-cli 1 project from the angular-cli 2 project, and if possible, how could this be done.

1
  • 1
    I would be more specific as to what a solution is, as someone who uses asp.net I assume you mean a Visual Studio Solution, however; I would also note that the fact it is in a Solution has no bearing on this question, maybe you should update the question in a way that serves anyone working on a project with multiple Angular CLI projects. IMHO Commented Sep 13, 2017 at 17:50

1 Answer 1

1

You can one project as a dependency. Take a look at Primefaces PrimeNG. It is a angular2 based library. It just exports some modules/components that you can use in your app.

You can also get interest in subapps (see https://github.com/angular/angular-cli/issues/761)

Sign up to request clarification or add additional context in comments.

5 Comments

Ok I export the module as i.e. PrimeNG accordion, but how do I access/import them from the other angular-cli project
And how do i make angular-cli 1 project dependent on angular-cli 2 project?
add it as a npm module, the webpack should bundle it
As you understand I'm new to angular and webpack, so I need to ask how to create an nmp module of the angular-cli 2 project, and then how to reference this locally in angular-cli 1 package.json
It seems to be an architecture issue. Because you can make a project with components shared between those two applications. Then you just add something like this to package.json { “name”: “my-app”, “dependencies”: { “lodash”: “^2.0.0”, “my-module”: “file:local_modules/my-module”, } } it's from medium.com/@arnaudrinquin/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.