refactored resolve in ab-editorModal.directive.js