I have this angularJS function
$scope.myFunc = () => {
myModule.getConfig().update(params);
myModule.go();
myModule.log('ok');
};
and the go function
go: function () {
$state.go('myFunc', options);
},
myModule.go() is calling an API and taking some time. How can I modify this code to call myModule.log() only when the previous line has finished?