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:
- Use
ui-router
Note: Under heavy development, may introduce breaking changes. - 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.