I have a Knockout
application developed using Durandal.JS
. Here is the structure of my project:
- Parent
- Index.js
- Index.html
- Child1
- Index.js
- Index.html
- Child2
- Index.js
- Index.html
I have a function UpdateData()
declared in Child2/Index.js
and I want to consume that function from Child1/Index.js
Reason of declaring this function in Child2
is, I have other variables and controls declared in Child2. And by calling UpdateData()
method, I want to update the value of all variables declared in Child2.
I don't know how to handle this situation.