Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 659
ng-R Avatar asked Dec 19 '14 11:12

ng-R


3 Answers

In your options you want: position-class, not positionClass.

like image 69
Matt M Avatar answered Sep 28 '22 17:09

Matt M


I've added the below code for completeness:

<toaster-container toaster-options="{'time-out': 3000, 'position-class': 'toast-bottom-left', 'close-button':true, 'animation-class': 'toast-bottom-left'}"></toaster-container>
like image 44
Arran549 Avatar answered Sep 28 '22 16:09

Arran549


Modify it to:

'position-class': 'toast-bottom-right','close-button':true
like image 41
code Avatar answered Sep 28 '22 17:09

code