JanStevens / angular-growl-2

growl-like notifications for angularJS projects
MIT License
285 stars 97 forks source link

Programmatically destroy messages & allow disabling click to close #38

Closed chasemgray closed 10 years ago

chasemgray commented 10 years ago

37

chasemgray commented 10 years ago

I'm only using this for a subset of the features you support so I didn't get to check against all your demos.

JanStevens commented 10 years ago

Hello,

Thanks for your contribution, you changed a lot (extracting message service). I'll need some time to review it and test it against all the features we currently support. (Don't want to brake anything). But looks good! Can you list the features you already checked?

Regards

chasemgray commented 10 years ago

I can check some more of the examples you have online.

For my site I checked:

I added:

chasemgray commented 10 years ago

I checked all the codepen examples and the only thing not working is the reference ID. Not sure exactly why yet.

chasemgray commented 10 years ago

fixed references

JanStevens commented 10 years ago

Allright, looks great, when I have time this week I'll go through it and merge it, thanks!

jgoux commented 10 years ago

Exactly the PR I needed ! Thanks a lot @chasemgray ! :+1:

wkjesus commented 10 years ago

with this features, how can i destroy an a particular notification programatically...??? exm: growl.warning("This adds a warn message", {title: 'Warning!'}); //so how can i destroy this when user do something else...

i hope answer and thanks by the way..

chasemgray commented 10 years ago

it now returns the message object which has a destroy method.

On Fri, Sep 19, 2014 at 11:55 AM, Jesus Adan Carrasco roman < notifications@github.com> wrote:

with this features, how can i destroy an a particular notification programatically...??? exm: growl.warning("This adds a warn message", {title: 'Warning!'}); //so how can i destroy this when user do something else...

i hope answer and thanks by the way..

— Reply to this email directly or view it on GitHub https://github.com/JanStevens/angular-growl-2/pull/38#issuecomment-56219376 .

wkjesus commented 10 years ago

sorry, i can figure out.. i do a console.log(growl); but dont see, how call that method i dont know if you have an example.. pls. i am doing something like this :

$scope.addSpecialWarnMessage = function() { console.log("mensajes"); growl.warning("This adds a warn message", {title: 'Warning!'}); growl.info("This adds a info message", {title: 'Random Information'}); growl.success("This adds a success message"); //no title here growl.error("This adds a error message", {title: 'ALERT WE GOT ERROR'});

    $timeout(function(){
        console.log(growl);
    },100);
}

i nee to know how destroy for example the growl.warning, or what ever growl, ill appreciate your help. thx.. by the way and for a quickly reply.

chasemgray commented 10 years ago

var message = growl.info("This adds a info message", {title: 'Random Information'}); message.destroy();

On Fri, Sep 19, 2014 at 1:07 PM, Jesus Adan Carrasco roman < notifications@github.com> wrote:

sorry, i can figure out.. i do a console.log(growl); but dont see, how call that method i dont know if you have an example.. pls. i am doing something like this :

$scope.addSpecialWarnMessage = function() { console.log("mensajes"); growl.warning("This adds a warn message", {title: 'Warning!'}); growl.info("This adds a info message", {title: 'Random Information'}); growl.success("This adds a success message"); //no title here growl.error("This adds a error message", {title: 'ALERT WE GOT ERROR'});

$timeout(function(){
    console.log(growl);
},100);

}

i nee to know how destroy for example the growl.warning, or what ever growl, ill appreciate your help. thx.. by the way and for a quickly reply.

— Reply to this email directly or view it on GitHub https://github.com/JanStevens/angular-growl-2/pull/38#issuecomment-56227915 .

wkjesus commented 10 years ago

Te la rifaste!!!!! ......( translate to english... its something like ... you are awesome.. lol.. ) thx for your time to reply, that is what im looking for..... now all clear... by the way when do you think your fork will merge???...

m4r71n commented 10 years ago

Thank you very much @chasemgray!

valera-rozuvan commented 9 years ago

@chasemgray If you need the original https://github.com/marcorinck/angular-growl plus the functionality to programmatically destroy all messages, please check out https://github.com/valera-rozuvan/angular-growl-next . Release 0.4.2 of angular-growl-next makes available the method clearAll().

fgarci03 commented 9 years ago

It is still not possible to disable clickToClose even without the closing button (by clicking twice on the message itself). Is there a fix for this?

danemacaulay commented 8 years ago

+1 for message.destroy() thanks for adding this PR :dancer: