Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can call a function from one viewModel to another viewmodel.

3469873Jul 24 2019 — edited Jul 31 2019

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.

Comments
Post Details
Added on Jul 24 2019
5 comments
565 views