how can I change the color of Toast depends on message type in Angular material $mdToast?
问题 While using $mdToast.simple().content("some test") it is showing the toast with black color. how can I change that color to red, yellow and so, depends on the type of the error messages like error, warning and success. Similar question as this. 回答1: EDIT: For a correct implementation, please use rlay3s solution below :)! OUTDATED: I had problems displaying custom text with jhblacklocks solution, so I decided to do it like this using 'template': var displayToast = function(type, msg) {