0

I am considering using angular in a enterprise environment. Thinking forward, we will have multiple applications. Does angular support using multiple applications and sharing components. For example, can I share a Navigation component?

Update (2/1/19): I wanted to add my method to attempt shared navigation, and I will also explain where I am currently stuck.

I have two projects:

1) I created an Angular Library ([see here][1]) that has a menu component. I will use this component to share the menu with an Angular project (project-a). I can add the navigation component to project-a by putting the selector in my app.component.html:

2) My Angular Project (project-a)

In designing my-menu, I'd like to use angular routing. My question is: In my library's router, how can I reference a component that is in project-a. project-a is in a different workspace.

1
  • a navigation component? like a nav menu that displays generic items? Of course you can... in fact angular material provides a generic nav component. It's just if you design it in a way that makes it pluggable and portable. Commented Dec 19, 2018 at 21:10

2 Answers 2

1

My company does this and wraps them up as npm packages in our own private npm feed.

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

Comments

0

You could provide the URLs to navigate between apps via an API called from all apps. It would be more flexible than purely Angular options such as a shared package containing the URLs.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.