m-e-conroy / angular-dialog-service

A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap and Twitter Bootstrap
MIT License
618 stars 227 forks source link

Problem when creating dialog within the other dialog's controller #70

Closed marigan closed 10 years ago

marigan commented 10 years ago

dataProvider not found error appears when i try to create a new predefined dialog within a custom dialog controller. Steps to reproduce:

  1. create a custom dialog
dialogs.create('template','controller',{},{})

2.within its controller call one of a predefined dialogs

dialogs.wait()

= You should see an error in the console saying unknown dataProvider

WORKAROUND There is a workaround to not use predefined wait function. You can just call:

dialogs.create('/dialogs/wait.html', 'waitDialogCtrl', {header: '', msg: ''})
m-e-conroy commented 10 years ago

Are you properly injecting "dialogs" into the custom dialog controller? If you are, is the custom dialog controller have access to the module "dialogs.main?"

Seems kind of odd that you'd be able to use "dialogs.create" and not "dialogs.wait" since they are both in the same services module.

m-e-conroy commented 10 years ago

Can't reproduce this problem. Need more information.