Toaster —— AngularJS 的无堵塞消息提醒

    xiaoxiao2023-06-17  162

    AngularJS Toaster 是 AngularJS 的扩展,实现了无堵塞消息通知。该项目对 Toastr 进行改造,原来的 Toastr 只支持 jQuery,而 AngularJS Toaster 只需要依赖 AngularJS 即可。

    https://yqfile.alicdn.com/6cbf9c074f847b939e1c4a67ad0c1a8e671511d2.png" >

    示例代码:

    // Display an info toast with no title angular.module('main', ['toaster']) .controller('myController', function($scope, toaster) { $scope.pop = function(){ toaster.pop('success', "title", "text"); }; }); <div ng-controller="myController"> <button ng-click="pop()">Show a Toaster</button> </div>

    文章转载自 开源中国社区 [http://www.oschina.net]

    相关资源:AngularJS Toaster使用详解
    最新回复(0)