1

Following the advise of this answer, I've been trying to render a controller and template manually, but I can't get it to work when the template contains an ng-switch directive. Any ideas?

Here's the fiddle: http://jsfiddle.net/kynZm/

Community
  • 1
  • 1
Stephen Bunch
  • 327
  • 4
  • 15

1 Answers1

0

It looks like the ng-switch directive was being compiled before my link function had a chance to run and was linking to the $rootScope. Moving the $compile call to the compile phase of the directive seemed to do the trick.

http://jsfiddle.net/z8uXg/

Stephen Bunch
  • 327
  • 4
  • 15