Let's I have an x.html view and x.js viewModelFile and x.html have this line of code.
x.html looks like this.
<button on-click="go_to">
<div data-bind="ojModule: { viewName: 'y'}" class="oj-flex oj-sm-flex-wrap-nowrap"></div>
y.js looks like this.
function go_to() {
if(some_condition) {
call a function of y.js
}
}
How can I call a function of y.js?
x.js and y.js both are viewModels.