Angularjs: how to change a template for a specific ng-view or ng-include?

I have multiple ng-views and ng-include on the same page,

I would like to change the template of a specific ng-include when changing the route?

+4
source share
1 answer

You may have to use the same template, but inside this template use ng-switch in combination with ng-include to load the corresponding template. Your controller can set some $ scope property that ng-switch will use to determine which template to load.

Andy has already provided an example: fooobar.com/questions/28030 / ...

+2
source

All Articles