$mdDialog returning an error when calling textContent

212 views Asked by At
$mdDialog.show(
    $mdDialog.alert()
    .title('Confirm delete?')
    .clickOutsideToClose(true)
    .textContent('Hello world')
    .ok('Yes')
    .targetEvent(ev)
  );

And my browser log this error as below. $mdDialog.alert(...).title(...).clickOutsideToClose(...).textContent is not a function

1

There are 1 answers

0
Avneesh Kumar On

or version 0.11.4,its just content not textContent.

$mdDialog.show(
    $mdDialog.alert()
    .title('Confirm delete?')
    .clickOutsideToClose(true)
    .content('Hello world')     // change textContent to content
    .ok('Yes')
    .targetEvent(ev)
);