From 1f874868e6d0d1af808debd8bd932d08f5b9805b Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Sat, 9 Feb 2013 22:41:56 +0100 Subject: [PATCH] fix(dialog): update resolve section to new syntax Closes #126 --- src/dialog/dialog.js | 14 +++++++++----- src/dialog/test/{dialog.js => dialog.spec.js} | 0 2 files changed, 9 insertions(+), 5 deletions(-) rename src/dialog/test/{dialog.js => dialog.spec.js} (100%) diff --git a/src/dialog/dialog.js b/src/dialog/dialog.js index 34efd72831..a8a24374a4 100644 --- a/src/dialog/dialog.js +++ b/src/dialog/dialog.js @@ -249,11 +249,15 @@ dialogModule.provider("$dialog", function(){ // * `label`: the label of the button // * `cssClass`: additional css class(es) to apply to the button for styling messageBox: function(title, message, buttons){ - return new Dialog({templateUrl: 'template/dialog/message.html', controller: 'MessageBoxController', resolve: {model: { - title: title, - message: message, - buttons: buttons - }}}); + return new Dialog({templateUrl: 'template/dialog/message.html', controller: 'MessageBoxController', resolve: + {model: function() { + return { + title: title, + message: message, + buttons: buttons + }; + } + }}); } }; }]; diff --git a/src/dialog/test/dialog.js b/src/dialog/test/dialog.spec.js similarity index 100% rename from src/dialog/test/dialog.js rename to src/dialog/test/dialog.spec.js