Update ngDialog.js

My last suggestion was not working, so have modified a bit. This feature will allow identifying specific dialog if there are multiple dialog boxes opened.
@saifmd4u what's the purpose of commented code? Please clean up.