The scope is not available in the templateUrl directive. To do this, there is a function request on github: Either add an attribute region that is passed to the templateUrl function or preprocessor attributes based on the region parameters .
Here are two options (the second is more general):
Attribute: Area not available. But the original attributes. So, if the source attribute works for you, for example, if it's just a static string like this:
<div directive types="test1"></div>
templateUrl. , URL- , :
templateUrl: function(elem, attrs){ return ('mytemplate/'+attrs.types+'.html')},
, types , :
ngInclude ngInclude. templateUrl template, ngInclude / :
template: '<div ng-include src="\'mytemplate/\'+types+\'.html\'"></div>',
. ngInclude .
, , ngInclude.