<head>
<link rel="stylesheet" href="./bower_components/angular-veasy-toastr/dist/css/veasy-toastr.min.css">
</head>
<body>
<veasy-toastr></veasy-toastr>
<script type="text/javascript" src="./bower_components/angular-veasy-toastr/dist/js/veasy-toastr-tpls.min.js"></script>
<script type="text/javascript" src="./bower_components/angular-veasy-toastr/dist/js/veasy-toastr.min.js"></script>
</body>
angular.module('myModule', ['veasyToastr']);
angular.module('myModule', ['veasyToastr'])
.controller('notificationCtrl', [ 'veasyToastrNotify', function (veasyToastrNotify) {
veasyToastrNotify.success('Hello', 'World', 5000);
veasyToastrNotify.info('Hello', 'World', 5000);
veasyToastrNotify.warning('Hello', 'World', 5000);
veasyToastrNotify.error('Hello', 'World', 5000);
veasyToastrNotify.default('Hello', 'World', 5000);
}]);
.config(['veasyToastrProvider', function (veasyToastrProvider) {
var config = {
width: 300,
success: {
...
},
info: {
...
},
warning: {
...
},
error: {
...
},
default: {
...
}
};
veasyToastrProvider.setConfig(config);
}])
success: {
icon: string,
showIcon: boolean,
close: boolean,
timeout: Number,
style: {
backgroundColor: '#000',
close: {
fontSize: 20,
color: 'red'
},
icon: {
color: '#777'
},
title: {
fontSize: 25,
color: 'rgb(255, 143, 28)'
},
message: {
fontSize: 30,
color: '#F5F5F5'
}
}
}