GitHub user zjffdu opened a pull request:
https://github.com/apache/zeppelin/pull/2249
[WIP] ZEPPELIN-2356. z.angularBind should remove the existing AngularObject
### What is this PR for?
There're 2 issues in the current angular object usage in ZeppelinContext
when user run the paragraph with code z.angularBind and z.angularWatch multiple
times
* z.angularBind would set a new value if the angularObject is existed,
otherwise the registered watcher will be called which might not be what user
expect
* z.angularWatch would register multiple watchers if the angularObject is
existed, this also might not what user expect.
I have a suggestion that we could remove the existing AngularObject and
create a new one in z.angularBind, and create new method angularSet for setting
new value for AngularObject.
### What type of PR is it?
[Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring]
### Todos
* [ ] - Task
### What is the Jira issue?
* Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/
* Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg.
[ZEPPELIN-533]
### How should this be tested?
Outline the steps to test the PR here.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zjffdu/zeppelin ZEPPELIN-2356
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2249.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2249
----
commit 90a8ab34c7c0941f80c3dd30501efc11b7ed0c3a
Author: Jeff Zhang <[email protected]>
Date: 2017-04-11T07:16:02Z
ZEPPELIN-2356. z.angularBind should remove the existing AngularObject
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---