I'm new to the MVVM and pure javascript applications and I have a question.
Is it possible to gain hold and access members or methods in another viewmodel to initialize it in a certain way before showing, like for example in a logout link I would like to clear the username and password etc. before showing the login view again?
Thanks,
*******
Sorry, this turned out to be simple
access a property:
app.loginService.viewModel.set("username","");
access a method:
app.loginService.viewModel.onLogout();
Is it possible to gain hold and access members or methods in another viewmodel to initialize it in a certain way before showing, like for example in a logout link I would like to clear the username and password etc. before showing the login view again?
Thanks,
*******
Sorry, this turned out to be simple
access a property:
app.loginService.viewModel.set("username","");
access a method:
app.loginService.viewModel.onLogout();