Angular.JS: Panggilan Rekursif ke Pengontrol $ MDDialog

function nextFunctionPopup() {
            
    var index = dp.aaas.findIndex(aaa => aaa.id === dp.aaa.id);
    dp.order = index + 1;
    dp.aaa = dp.aaas[dp.order];
}
SAMER SAEID