Skip to content

Conversation

@corneadoug
Copy link
Contributor

What is this PR for?

In this new Good Practice Guide for Zeppelin-web, we focus on how event dispatching($broadcast, $emit, $on) works, and how to correctly use it in the app

What type of PR is it?

Documentation

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-1415

How should this be tested?

You can check the markdown file for typos or bad sentences :)

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@corneadoug
Copy link
Contributor Author

@AhyoungRyu Could you do a small typo/style check? :)


Now, there is a few things to know about using it from `$rootScope`:

* Both `$rootScope.$emit` and `$rootScope.$broadcast` go through child scopes since `$rootScope` do not have a parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "since $rootScope does not have a parent" :D

@AhyoungRyu
Copy link
Contributor

@corneadoug I left two comments in goodPracticeGuide02.md. Others are looks good I think 👍

@corneadoug
Copy link
Contributor Author

Fixed, Merging if there is no more discussions


Using `$broadcast` might not seem optimum if we consider the description we have above.

However it is optimized to only go through branches that have a matching event binding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"However, it"

@prabhjyotsingh
Copy link
Contributor

Minor suggestion, rest LGTM. :)

@asfgit asfgit closed this in 70e4ecd Sep 13, 2016
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.

3 participants