Skip to content
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

[#16] reload dashboard list when renaming dashboard #163

Closed
wants to merge 1 commit into from
Closed

Conversation

amirnissim
Copy link
Contributor

No description provided.

@arikfr
Copy link
Member

arikfr commented Apr 7, 2014

From what I've seen, using events for such things is sort of an anti pattern in AngularJS applications. Basically view should mutate based on data changes. In this case we need to have a Dashboard service that knows about the list and also manages the updates to a single dashboard (which will update the list).

From https://github.com/angular/angular.js/wiki/Best-Practices:

Only use .$broadcast(), .$emit() and .$on() for atomic events
Events that are relevant globally across the entire app (such as a user authenticating or the app closing). If you want events specific to modules, services or widgets you should consider Services, Directive Controllers, or 3rd Party Libs

Personally, at the beginning I used events for something similar and very soon things went sideways.

@arikfr arikfr closed this Oct 17, 2014
@arikfr arikfr deleted the fed branch April 1, 2015 14:26
washort pushed a commit to washort/redash that referenced this pull request Dec 13, 2017
washort pushed a commit to washort/redash that referenced this pull request Jan 8, 2018
washort pushed a commit to washort/redash that referenced this pull request Jan 9, 2018
washort pushed a commit to washort/redash that referenced this pull request Apr 30, 2018
washort pushed a commit to washort/redash that referenced this pull request May 31, 2018
washort pushed a commit to washort/redash that referenced this pull request Aug 11, 2018
alison985 added a commit to StantonVentures/redash that referenced this pull request Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants