I want to know what is the best way to execute a function on a Component, within the Components 'scope'. This function can be any function, a function that adds an item to a list or just makes an ajax call, or it does some math with the components current viewModel or even dom nodes from the view that were added by a jQuery plugin, afterwards the function returns a value.
Something like: Component.addItem(); or Component.requestAjaxData();
I know you can share parts of the viewModel to the parent using can-stache-bindings, but it does not pass functions.
I know that you can trigger a function on a observable change, but that kinda seems hacky to me. Unless I'm doing it wrong. Also this would not return a value.
If anyone needs me to clarify anything please ask!