fixed return problem
templateDirective(frameworkKey, templateKey)
-->
 function() {
     return templateDirective(frameworkKey, templateKey)
 }