fix($ionicModal): do not inherit has-header etc from parent scope

Closes #1191
This commit is contained in:
Andy Joslin
2014-04-29 10:49:34 -06:00
parent 3a68a2c902
commit 6c0c8350f2

View File

@@ -181,6 +181,15 @@ function($rootScope, $document, $compile, $timeout, $ionicPlatform, $ionicTempla
// Create a new scope for the modal
var scope = options.scope && options.scope.$new() || $rootScope.$new(true);
angular.extend(scope, {
$hasHeader: false,
$hasSubheader: false,
$hasFooter: false,
$hasSubfooter: false,
$hasTabs: false,
$hasTabsTop: false
});
// Compile the template
var element = $compile('<ion-modal>' + templateString + '</ion-modal>')(scope);