Simply expose a global (eg in main.js
)
window.au = el => {
let aureliaNode = el;
// go up the structure until an element affected by aurelia is found
while (aureliaNode !== null && aureliaNode !== undefined && aureliaNode.au === undefined) {
aureliaNode = aureliaNode.parentNode;
}
if (!aureliaNode.au){
return null;
}
return aureliaNode.au.controller.viewModel;
};
then right click any element, click inspect, and enter the following in the console
au($0).myProperty
where myProperty
is a custom view model property
inspired by angular.element($0).scope()