-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when
for activation is not ng2 conform
#4
Comments
Hi @ribizli, I like your proposal. Thank you! |
@ribizli Please take a look and let me know if this is better. |
Definitely, but I still think that the best solution is to use a service. There is no sense to include any component into the view if it doesn't have any view role. Sorry if this wasn't clear in my original post and you did unnecessary work. |
I already created a ticket for making a service out of this. Please refer to #9 Thanks for the feedback! |
One more: I guess you changed to component (from directive) because to be able to use template variable. But you can do it with directive as well using |
Yes, I was able to make it work with |
Still I'm curious about your argument for "component is useful" ;) |
@ribizli I agree a service can satisfy all use cases. |
Yes, I see using component is more confusing for the users (developers) since it has nothing to do with the view. And if you think about usecases, a notification will come rarely from a view (by a user action), but from other service calls. |
You have a great point. Do you mind submitting a PR? |
I go now for holiday for two weeks. I can't promise anything 😉 |
No problem, man. I'll have something by the time you come back. Enjoy your holiday and thank you for the support! |
Looking to update this project to angular 4 (5 soon enough). I would also like to implement this notification as a service rather than a component. Been a while since this repo has been updated but I would still like to contribute here rather than start from scratch. @alexcastillo thoughts? update: As i'm doing the updates/ enhancements I realized that it is simply much easier to create a brand new project (angular 4.2.4) and port over the functionality into an injectable service. I realized after commenting that the version of angular used in this project (2.0.0-rc 1) is simply too outdated to try and manually make changes to. |
It's only my opinion, but triggering via setting a variable to true for one CD iteration is dangerous and non ng2 conform.
I recommended using a template variable to trigger a notification.
But I think an even better way would be to use a service!
The text was updated successfully, but these errors were encountered: