4

I have few ng-views and ng-includes in one single page,

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

ciochPep
  • 2,472
  • 4
  • 26
  • 30

1 Answers1

2

You'll probably have to use the same template, but within that template, use ng-switch in combination with ng-include to load the appropriate template. Your controller can set some $scope property that ng-switch will use to determine which template to load.

Andy already provided an exmple of such here: https://stackoverflow.com/a/12584774/215945

Community
  • 1
  • 1
Mark Rajcok
  • 362,217
  • 114
  • 495
  • 492