I made a component which has a button.
On this button I binded a function like this:
HTML code:
- Code: Select all
<input type="button" value="Generate" ng-click="buttonClick()"></input>
JS code:
- Code: Select all
$scope.buttonClick = function() {$scope.handlers.myFunction("GO");}
Spec code:
- Code: Select all
"handlers": {"myFunction": "function"}
When i press this button, the function does what I want it to do.
Everything works fine.
Now for my question:
On my form, I placed the component where the button is.
Next to this component I placed a button.
So you have component | button.
Is it possible that I press the button (not in my component) and this button invokes a click on the button in my component?
In Javascript you would do something like this:
- Code: Select all
<input type="button" id="myNotComponentButton" onclick="myFunction()">
function myFunction() {document.getElementById("myComponentButton").click();}
Thanks,
Walter