templates as directives