toasterCtrl.js 374 B

1234567891011121314
  1. 'use strict';
  2. /**
  3. * controller for AngularJS-Toaster
  4. */
  5. app.controller('ToasterDemoCtrl', ['$scope', 'toaster', function ($scope, toaster) {
  6. $scope.toaster = {
  7. type: 'success',
  8. title: 'Title',
  9. text: 'Message'
  10. };
  11. $scope.pop = function () {
  12. toaster.pop($scope.toaster.type, $scope.toaster.title, $scope.toaster.text);
  13. };
  14. }]);