From 6c0c8350f2d925a91bcf1460dc58c7beb8c97922 Mon Sep 17 00:00:00 2001 From: Andy Joslin <andytjoslin@gmail.com> Date: Tue, 29 Apr 2014 10:49:34 -0600 Subject: [PATCH] fix($ionicModal): do not inherit has-header etc from parent scope Closes #1191 --- js/angular/service/modal.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/angular/service/modal.js b/js/angular/service/modal.js index 5bc5943f781..9d8c7e99e7c 100644 --- a/js/angular/service/modal.js +++ b/js/angular/service/modal.js @@ -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);