modal dialog close button not working

795 views
Skip to first unread message

graph...@gmail.com

unread,
Apr 16, 2013, 9:29:22 AM4/16/13
to ang...@googlegroups.com
I've created a directive, which contains one button. When the user clicks on the button it opens up a modal dialog (ui-bootrstrap modal wrapped in a directive).

The problem is that clicking on the close button has no effect. This is because 'dialog' is undefined in my code. How do I get a reference to the actual dialog box from the directive controller. See jsfiddle: http://jsfiddle.net/graphicsxp/fcQZk/7/

thanks

graph...@gmail.com

unread,
Apr 16, 2013, 9:43:00 AM4/16/13
to ang...@googlegroups.com
As a follow up and after looking at the modal example here (http://angular-ui.github.io/bootstrap/#/dialog), I realize that: 

1) I did not specify a controller for $scope.opts
2) The controller is actually part of the searchPerson directive.

How can I solve this ? 

graph...@gmail.com

unread,
Apr 16, 2013, 2:56:13 PM4/16/13
to ang...@googlegroups.com
Here's the updated fiddle:  http://jsfiddle.net/graphicsxp/fcQZk/8/

I've added a controller, which is assigned to the dialog options and also to the directive's controller. 

Now, I still can't get a reference to the dialog when I click on the close button. I'm soooooo in need of some help. 

Please can anyone have a look at the fiddle and help getting this to work ? 

johntom

unread,
Apr 19, 2013, 4:24:52 PM4/19/13
to ang...@googlegroups.com
Take a look at a working example
HTH
John
Reply all
Reply to author
Forward
0 new messages