material icon indicating copy to clipboard operation
material copied to clipboard

mdDialog: Using directives with template config option

Open parky128 opened this issue 11 years ago • 2 comments

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.

parky128 avatar Sep 30 '15 13:09 parky128

+1

ringil-21 avatar Mar 11 '16 18:03 ringil-21

+1

jojogeyer avatar Mar 11 '16 18:03 jojogeyer