material
material copied to clipboard
mdDialog: Using directives with template config option
I am experimenting with using a custom directive as the template config option for an mdDialog.
Is it possible to set the values for the scope attributes (e.g. my model and close properties) in the directive when using as the template option?
$mdDialog.show({
template: '<md-dialog><date-time-range-picker model="someModel" close="togglePicker"></date-time-range-picker></md-dialog>',
parent: angular.element(document.body)
});
If not, I guess I will need to move away from using a custom directive and just have a regular html template with a controller for the mdDialog config.
+1
+1