Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 18, 2018 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/08c698f38d7cddc5bf2cf694266335e8 to your computer and use it in GitHub Desktop.
Save parzibyte/08c698f38d7cddc5bf2cf694266335e8 to your computer and use it in GitHub Desktop.
app.controller("principal", ["$scope", "Notification", function ($scope, Notification) {
let scopeNuevo = $scope.$new(true);
scopeNuevo.autor = "parzibyte";
scopeNuevo.decirHola = function () {
alert("Hola!");
}
Notification({
type: "success",
title: "El título de la notificación",
message: "El mensaje",
delay: 3000, // Se oculta después de 3 segundos,
templateUrl: 'plantilla.html',
scope: scopeNuevo,
onClick: function () {
alert("¡Le diste click!")
},
onClose: function () {
alert("La notificación se ha cerrado");
}
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment