angularjs - How to Add icon on dialogue in angular-material -


i using angular-material in project. want show dialogue using

var confirm = $mddialog.confirm()             .title(modalobject.header)             .content(modalobject.text)             .ok(modalobject.control)         $mddialog.show(confirm).then(function () {             var status = 'you decided rid of debt.';         }, function () {             status = 'you decided keep debt.';         }); 

my requirement have icon header or inside body anywhere show dialogue what. eg : error, warning , success

but not able achieve this.

can please tell me how can resolve it.

you'll have include in function.. like..

    $scope.showconfirm = function (ev){  var confirm = $mddialog.confirm()             .title(modalobject.header)             .content(modalobject.text)             .ok(modalobject.control)         $mddialog.show(confirm).then(function () {             var status = 'you decided rid of debt.';         }, function () {             status = 'you decided keep debt.';         });  }; 

and call either html. ng-click="showconfirm()"

or call function inside controller $scope.showconfirm();

make sure have correct controller assigned content.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -