0

I use ng-view to pull in a partial to page. After that I would like to load in another partial to the page that would be right next to the initial partial that was brought in.

How would I bring in another partial from a angular controller?

Austin Lovell
  • 1,049
  • 3
  • 17
  • 29

1 Answers1

2

Because of how ngRoute was designed, you can only have one ng-view per ng-app instance.

However, it looks like you are looking for ng-include since the routes do not seem to come into play.

Otherwise, to work around the issue of URL routing having only one template, you have two options:

  1. Use ui-router Note: Under heavy development, may introduce breaking changes.
  2. Define and use two angular applications which can reuse the controller/service code. However, then the two applications will not be able to share state.
musically_ut
  • 34,028
  • 8
  • 94
  • 106