How to show md-toast with background color
https://codepen.io/neilkalman/pen/jWBqve
<div ng-controller="AppCtrl" layout-fill="" layout="column" class="inset toastdemoBasicUsage" ng-cloak="" ng-app="MyApp">
<p>
Toast with changes to answer <a href="http://stackoverflow.com/questions/34614767/how-to-show-md-toast-with-background-color">this question on stack overflow</a>
</p>
<div layout="row" layout-sm="column" layout-align="space-around">
<md-button ng-click="showSimpleToast()">
Toast
</md-button>
</div>
</div>
<style>
md-toast.md-success-toast-theme .md-toast-content {
background-color: green;
}
md-toast.md-error-toast-theme .md-toast-content {
background-color: maroon;
}
md-toast {
left: calc(50vw - 150px);
}
</style>
<script>
angular.module('MyApp',['ngMaterial', 'ngMessages'])
.controller('AppCtrl', function($scope, $mdToast, $document) {
$scope.showSimpleToast = function() {
$mdToast.show(
$mdToast.simple()
.textContent('Simple lala Toast!')
.position('top')
.theme('error-toast')
.hideDelay(3000)
);
};
})
</script>