Question

I know how to insert a template into a page upon a url change (using $routeProvider) and an element with ng-view. But, I also want to insert another template into a different element at the same time. How do I do this? For example, I want to insert a template into the replace-this element at the same time I use $routeProvider to insert a template into ng-view.

<div class="replace-this">
    // I also want to insert a template here
</div>
<div ng-view>
    // main template goes here after url change from $routeProvider
</div>

Thanks in advance for any help that may be provided!

Était-ce utile?

La solution

ui-router from angular-ui supports multiple parallel views. You may want to check it out: https://github.com/angular-ui/ui-router

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top