简体   繁体   中英

Angularjs-toaster always displays toast notification on top-right

I have this sample html file. Here I am using angular-toast notification. Issue I am facing here is toast messages always appear on the top-right position.

script.js file contains

    angular.module('main', ['ngAnimate', 'toaster']).controller('myController', function($scope,toaster, $window) {

        $scope.pop = function(){
            toaster.pop('success', "title", 'message');
        };

        $scope.clear = function(){
            toaster.clear();
        };
    });

Please find the plunker link http://plnkr.co/edit/pzuW5OVkoxLF7zl0mGaC?p=preview

Thanks in advance

在你想要的选项中: 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM