Last active
March 15, 2017 05:15
-
-
Save SergeyAxenov/f26ce38792c7d8bfacf3555eba3cb11a to your computer and use it in GitHub Desktop.
Zeppelin 0.6.2 - How to get all registered angular objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Zeppelin InterpreterContext | |
// 2. How to get all angular objects registered in the note | |
z.angularBind("ax4_var","value") | |
val ctx = z.getInterpreterContext | |
ctx.getAngularObjectRegistry().getAllWithGlobal(ctx.getNoteId()) | |
z.angularUnbind("ax4_var") | |
ctx.getAngularObjectRegistry().getAllWithGlobal(ctx.getNoteId()) | |
// OUTPUT: | |
//ctx: org.apache.zeppelin.interpreter.InterpreterContext = org.apache.zeppelin.interpreter.InterpreterContext@1454e6d9 | |
//res227: java.util.List[org.apache.zeppelin.display.AngularObject[_]] = [AngularObject{noteId='2CAEG92EB', paragraphId='null', object=value, name='ax4_var'}] | |
//res229: java.util.List[org.apache.zeppelin.display.AngularObject[_]] = [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment