Take a look at this code snippet
my_app.run( [ '$templateCache' , function( $templateCache ) {
var template = "" +
"{{ item.name }}" +
"<ul ng-if='item.sub'>" +
"<li ng-repeat='item in item.sub' ng-include=\"'angular-multi-select-item.htm'\"></li>" +
"</ul>" +
"";
$templateCache.put( 'angular-multi-select-item.htm' , template );
}]);
Although this code functions correctly, I find it visually unattractive (concatenated strings with HTML embedded). Is there a cleaner and more efficient way to define Angular templates?