sending a variable from javascript to visualneo script - Forum

Forum Navigation
You need to log in to create posts and topics.

sending a variable from javascript to visualneo script

hello, comrades! The container has html code. When I click on a button with ng-click="subFunc(product.name ) Passing a variable to a subroutine, I get a variable in javascript, but I can't get it in the visualneo script. Help me out

Uploaded files:
  • You need to login to have access to uploads.

@alexander_loc all NeoScript variables are stored into $App object. So if you write this in JavaScript:

$App.name = name;

The NeoScript variable [name] will be populated with the JavaScript variable name value.

Regards.

 

 

@luishp

Thanks for the answer! For some reason, within this subroutine, I get the value undefined in neo script, but outside of this subroutine, after its execution, the value of the variable is displayed correctly. Only now I guessed to try to pass in the parameters of the subroutine. The code was reduced to one line bypassing JavaScript. I hope this will help someone save time

Uploaded files:
  • You need to login to have access to uploads.
luishp has reacted to this post.
luishp