I'm writing a directive and I'd like to have an attribute that can accept an expression, template url or string. Is there an angular method I can use that will resolve such a parameter? I mean where I can do....
<directive dialog="path/to/template.htm"></dialog>
or
<directive dialog="Are you sure you want to do that?" type="confirm"></dialog>
And in my directive code all I need to do is something like...
directive('dialog', function ($http) {
    return {
        compile: function (element, attrs) {
            var dialogContent = angular.resolveExpression(attrs.dialog);
        }
    }
}).
The idea being that if template.htm contained expressions within it or directives that they would all be parsed correctly.
 
    