Ich habe zwei Controller, die verschachtelt sind:Zwingende in AngularJS
Controller A {
$scope.submitForm = submitForm;
}
Und
Controller B {
function submitForm() {
//Will this method be invoked? When there is a submit event fired in controller A?
}
}
Hinweis: -Controller A und B sind verschachtelt, dh B ist in A.
Der beste Weg, um eine Funktion in einem anderen Controller aufzurufen ist 'rootscope zu verwenden und dann die scope.on function' –
Dies ist nur eine Aussage. Was ist die Frage? Weitere Informationen finden Sie unter https://stackoverflow.com/help/mcve, https://stackoverflow.com/help/how-to-ask – Brian