Re: Detecting change on an Angular variable not works

2015-08-19 Thread hasan türken
I just able to try and passing InterpreterContext works like a charm. Thanks... On Tue, Aug 18, 2015 at 8:03 PM, moon soo Lee wrote: > If you pass InterpreterContext to z.run(), it might help. for example, > > * z.angularWatch("selectedNode", (before:Object, after:Object, * > *context:org.apache

Re: Detecting change on an Angular variable not works

2015-08-18 Thread moon soo Lee
If you pass InterpreterContext to z.run(), it might help. for example, * z.angularWatch("selectedNode", (before:Object, after:Object, * *context:org.apache.zeppelin.interpreter.InterpreterContext**) => {* *z.run(2, context)* *})* Let me know if it works. Thanks moon On Tue, Aug 18,

Re: Detecting change on an Angular variable not works

2015-08-18 Thread hasan türken
Hi Moon, Yes, you are right, I can get the updated value with z.angular(). But the problem is the watch I set for the value is not working correctly, i.e works only once in first change. Thanks, Hasan 18 Ağustos 2015 Salı tarihinde, moon soo Lee yazdı: > Hi Hasan, > > You might able to get upd

Re: Detecting change on an Angular variable not works

2015-08-18 Thread moon soo Lee
Hi Hasan, You might able to get updated value in scala side, by doing z.angular("selectedNode") Thanks, moon On Tue, Aug 18, 2015 at 6:02 AM hasan türken wrote: > Hi, > > First of thanks for the awesome Angular interpreter, which seems to have a > big potential. > I am trying to detect a chan

Re: Detecting change on an Angular variable not works

2015-08-18 Thread Corneau Damien
Try to add debugs to all functions to track why it doesn't update afterwards. If you don't find out, post all of your paragraphs code and I will take a look or do an example tomorrow. On Aug 19, 2015 12:01 AM, "hasan türken" wrote: > Thanks for the explanations. > > First, I changed the last line

Re: Detecting change on an Angular variable not works

2015-08-18 Thread hasan türken
Thanks for the explanations. First, I changed the last line: *scope.selectedNode = d.name ;* to *scope.$apply(function(){* *scope.selectedNode = d.name ;* *})* Because in the former one, there is a delay before the value change on the page. With

Re: Detecting change on an Angular variable not works

2015-08-18 Thread Corneau Damien
The difference is the scope of variables. The angularBinded values must me accessible at notebook level to be used by any of its paragraph. In your case you were setting the scope value in a paragraph dom node scope level. Which means its not accesible by other paragraphs. Furthermore we only sen

Re: Detecting change on an Angular variable not works

2015-08-18 Thread Corneau Damien
The angularbind.watch function is already taking care of pushing changes from front to backend. However like stated before, the front scope variable are currently stored at app scope level in something named compiledScope (im working on sandboxing that better). So the way to set the scope variable

Re: Detecting change on an Angular variable not works

2015-08-18 Thread hasan türken
I could not understand why it is so hard. I just thought it was something very similar what is shown in this video: https://www.youtube.com/watch?v=QdjZyOkcG_w (code is here: https://github.com/apache/incubator-zeppelin/pull/27) Where, there is a dropdown list whose value is binded to an Angular/

Re: Detecting change on an Angular variable not works

2015-08-18 Thread DuyHai Doan
Personnally I tried to modify the source code of the Zeppelin notebook.controller.js to add a new method "pushAngular" to trigger update from front-end to back-end. But it requires some knowledge of AngularJS. On Tue, Aug 18, 2015 at 3:39 PM, hasan türken wrote: > Thanks for quick response. > Ch

Re: Detecting change on an Angular variable not works

2015-08-18 Thread hasan türken
Thanks for quick response. Checked the lines you shared, but I am new to Front-end development and could not imagine how and where to access and play with the compileScope (I think it is compiledScope, as I saw in the code you linked). Should I try to access it within my dblclick function? Or from

Re: Detecting change on an Angular variable not works

2015-08-18 Thread DuyHai Doan
This is very tricky. I had a look into the source code of the Angular object binding system and it appears that there is an isolated compile scope: Definition: https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-web/src/app/app.controller.js#L17 Usage: https://github.com/apache/incu

Detecting change on an Angular variable not works

2015-08-18 Thread hasan türken
Hi, First of thanks for the awesome Angular interpreter, which seems to have a big potential. I am trying to detect a change on an Angular variable using the Angular interpreter. I am changing the Angular variable within a javascript function, see the result but binded scala object does not change