Get model from element

#1

Hi, if I want to modify an aurelia page from external javascript, how can I get to the model given that I have a DOM element?

#2

Can you try element.au.controller.viewModel?

#3

Thanks!

That seems to work great, so I can do element.au.controller.viewModel.someField = “foo”. But then how do I “run” validation? Validation errors still show.