mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Fixed #74
This commit is contained in:
@ -10,8 +10,8 @@ angular.module('ionic.service.actionSheet', ['ionic.service.templateLoad', 'ioni
|
||||
*
|
||||
* @param {object} opts the options for this ActionSheet (see docs)
|
||||
*/
|
||||
show: function(opts) {
|
||||
var scope = $rootScope.$new(true);
|
||||
show: function(opts, $scope) {
|
||||
var scope = $scope && $scope.$new() || $rootScope.$new(true);
|
||||
|
||||
angular.extend(scope, opts);
|
||||
|
||||
|
||||
4
js/ext/angular/src/service/ionicPopup.js
vendored
4
js/ext/angular/src/service/ionicPopup.js
vendored
@ -15,7 +15,7 @@ angular.module('ionic.service.popup', ['ionic.service.templateLoad'])
|
||||
};
|
||||
|
||||
return {
|
||||
alert: function(message) {
|
||||
alert: function(message, $scope) {
|
||||
|
||||
// If there is an existing popup, just show that one
|
||||
var existing = getPopup();
|
||||
@ -30,7 +30,7 @@ angular.module('ionic.service.popup', ['ionic.service.templateLoad'])
|
||||
|
||||
opts = angular.extend(defaults, opts);
|
||||
|
||||
var scope = $rootScope.$new(true);
|
||||
var scope = $scope && $scope.$new() || $rootScope.$new(true);
|
||||
angular.extend(scope, opts);
|
||||
|
||||
// Compile the template
|
||||
|
||||
Reference in New Issue
Block a user