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/
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/
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.