我有这个示例 html 文件。在这里,我使用角度吐司通知。我在这里面临的问题是吐司消息总是出现在右上角。
脚本.js文件包含
angular.module('main', ['ngAnimate', 'toaster']).controller('myController', function($scope,toaster, $window) {
$scope.pop = function(){
toaster.pop('success', "title", 'message');
};
$scope.clear = function(){
toaster.clear();
};
});
请找到 plunker 链接 http://plnkr.co/edit/pzuW5OVkoxLF7zl0mGaC?p=preview
提前致谢
在您的选项中,您需要:position-class
,而不是positionClass
。
为了完整起见,我添加了以下代码:
<toaster-container toaster-options="{'time-out': 3000, 'position-class': 'toast-bottom-left', 'close-button':true, 'animation-class': 'toast-bottom-left'}"></toaster-container>
将其修改为:
'position-class': 'toast-bottom-right','close-button':true