define base resource factory
add ngdialog