Changed the initialization so that the ngDialogData is bound to the scope before the controller is instantiated.