material icon indicating copy to clipboard operation
material copied to clipboard

Why $mdDialog.content() don't support html code?

Open luozhihua opened this issue 11 years ago • 3 comments

If I only want to show a image using $mdDialog, I think the best way to do this is pass a piece of html code into $mdDialog.content(), Instead of using a separate template files

luozhihua avatar Mar 06 '15 10:03 luozhihua

Hi,

I didn't try, but can't you use this to provide an inline template ?

$mdDialog.show({
  template: '<img src="" alt="">'
})

carab avatar Mar 06 '15 12:03 carab

See $mdDialog Docs

  • $mdDialog.show().template = '<img src="" alt="">'
  • $mdDialog.show({template : '<img src="" alt="">'})
  • $mdDialog.show().templateUrl = '/templates/myAlert.html'>'
  • $mdDialog.show({templateUrl : '/templates/myAlert.html'})

ThomasBurleson avatar Mar 11 '15 23:03 ThomasBurleson

@ThomasBurleson Thanks!

luozhihua avatar Mar 12 '15 01:03 luozhihua