added `template()` method that can be used as a directives `template property