fix(ionContent): make scrollable content work as child of non-scrollable

Closes #1421
This commit is contained in:
Andrew Joslin
2014-05-19 06:46:56 -06:00
parent 37d06274f1
commit 488bd5c08c
2 changed files with 15 additions and 2 deletions

View File

@@ -75,6 +75,20 @@ describe('Ionic Content directive', function() {
expect(scroll.length).toBe(0);
});
it('should work scrollable with nested ionScroll elements', function() {
var element = compile(
'<ion-content scroll="false" class="content1">' +
'<div>' +
'<ion-content class="content2">' +
'</ion-content>' +
'</div>' +
'</ion-content>')(scope);
scope.$apply();
expect(jqLite(element[0].querySelector('.content2')).controller('$ionicScroll')).toBeTruthy();
expect(element.controller('$ionicScroll')).toBeFalsy();
});
it('should add padding classname to scroll element', function() {
var element = compile('<ion-content padding="shouldPad"></ion-content>')(scope);
var scroll = element.find('.scroll');