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

ios - Is 'init' forbidden as *part* of a variable name? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

c# - Get the Class name in a class with atribute inside a attribute method -