matowens / ng-notify

A simple, lightweight module for displaying notifications in your AngularJS app.
http://matowens.github.io/ng-notify
MIT License
668 stars 66 forks source link

How to use custom html code in a div container or an angular directive ? #27

Closed cheikhnadiouf closed 8 years ago

cheikhnadiouf commented 8 years ago

How can we customize an html code message notification in the body of a page like a div container or an angular directive ?

matowens commented 8 years ago

Hey Stylemaker, that's a really good question. I don't think you'd be able to do that with ng-notify in it's current state, it currently just appends itself to the page's body tag. I've had another person ask the same thing recently, I'll dig around a bit to see what it would require for us to do that. If you have any thoughts or ideas, please share them in here, too.

matowens commented 8 years ago

@systemaker is this inline with what you were talking about?

http://codepen.io/matowens/full/XXwoGV/

I just threw together a rough prototype, I'll work on cleaning it up and potentially creating a new release with it this weekend. I'd like to know what your thoughts are before I start doing that, though, just to make sure we're on the same page.

sinsunsan commented 8 years ago

By comparison with the actual implementation,

Do the div need a specific layout, css ... for you alert to display correctly ? Is it a sub directive ? we need to place on the div ?

cheikhnadiouf commented 8 years ago

right , it is the new stuff i was looking for :

thanks to implement it as a new feature in this module .

cheikhnadiouf commented 8 years ago

Hello, any news about this feature ?

matowens commented 8 years ago

@systemaker it's all but done. just need to update the test cases and do some eyeball testing, then it should be ready to roll. expect something in the next couple of days.

matowens commented 8 years ago

Update should be available for use. There was a fair amount of refactoring involved so it wouldn't surprise me if there were a few issues here and there. Let me know if you run into anything odd.

matowens commented 8 years ago

Check demo for example using target.

http://matowens.github.io/ng-notify/

cheikhnadiouf commented 8 years ago

Great, thanks !