The template needs to be retrieved from the $templateCache. If not done, one gets the templateUrl instead of the HTML form.