From 52578f07382fc94fa938e4ceeaa819edfc8e6f8e Mon Sep 17 00:00:00 2001 From: zz911 Date: Sun, 9 Nov 2014 18:22:32 +0800 Subject: [PATCH] [Bug] Default value overwrites the option's value. --- js/angular/service/popover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/angular/service/popover.js b/js/angular/service/popover.js index 38992c6356..86ad4f2c1a 100644 --- a/js/angular/service/popover.js +++ b/js/angular/service/popover.js @@ -191,7 +191,7 @@ function($ionicModal, $ionicPosition, $document, $window) { * controller (ionicPopover is built on top of $ionicPopover). */ fromTemplate: function(templateString, options) { - return $ionicModal.fromTemplate(templateString, ionic.Utils.extend(options || {}, POPOVER_OPTIONS) ); + return $ionicModal.fromTemplate(templateString, ionic.Utils.extend(POPOVER_OPTIONS, options || {}) ); }, /** * @ngdoc method @@ -202,7 +202,7 @@ function($ionicModal, $ionicPosition, $document, $window) { * an {@link ionic.controller:ionicPopover} controller (ionicPopover is built on top of $ionicPopover). */ fromTemplateUrl: function(url, options, _) { - return $ionicModal.fromTemplateUrl(url, options, ionic.Utils.extend(options || {}, POPOVER_OPTIONS) ); + return $ionicModal.fromTemplateUrl(url, options, ionic.Utils.extend(POPOVER_OPTIONS, options || {}) ); } };