diff --git a/dist/css/ionic-ios7.css b/dist/css/ionic-ios7.css
index 1e14496639..c075d761e1 100644
--- a/dist/css/ionic-ios7.css
+++ b/dist/css/ionic-ios7.css
@@ -367,15 +367,7 @@ body, .ionic-body {
-webkit-transform: translateZ(0px);
transform: translateZ(0px); }
-.content-wrapper {
- position: absolute;
- top: 0;
- overflow: auto;
- width: 100%;
- height: 100%;
- -webkit-overflow-scrolling: touch; }
-
-.content-plain {
+.content {
position: absolute;
width: 100%;
top: 0;
diff --git a/dist/css/ionic-scoped.css b/dist/css/ionic-scoped.css
index b365ad6d04..3f1070e3be 100644
--- a/dist/css/ionic-scoped.css
+++ b/dist/css/ionic-scoped.css
@@ -1139,14 +1139,7 @@
.ionic .content > * {
-webkit-transform: translateZ(0px);
transform: translateZ(0px); }
- .ionic .content-wrapper {
- position: absolute;
- top: 0;
- overflow: auto;
- width: 100%;
- height: 100%;
- -webkit-overflow-scrolling: touch; }
- .ionic .content-plain {
+ .ionic .content {
position: absolute;
width: 100%;
top: 0;
diff --git a/dist/css/ionic.css b/dist/css/ionic.css
index 58ca3a6daf..a2e27239f6 100644
--- a/dist/css/ionic.css
+++ b/dist/css/ionic.css
@@ -1446,15 +1446,7 @@ body, .ionic-body {
-webkit-transform: translateZ(0px);
transform: translateZ(0px); }
-.content-wrapper {
- position: absolute;
- top: 0;
- overflow: auto;
- width: 100%;
- height: 100%;
- -webkit-overflow-scrolling: touch; }
-
-.content-plain {
+.content {
position: absolute;
width: 100%;
top: 0;
diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js
index 3857cfe1dc..8edec6c3fb 100644
--- a/dist/js/ionic-angular.js
+++ b/dist/js/ionic-angular.js
@@ -340,13 +340,12 @@ angular.module('ionic.ui.content', [])
return {
restrict: 'E',
replace: true,
- template: '
',
+ template: '',
transclude: true,
compile: function(element, attr, transclude) {
return function($scope, $element, $attr) {
- var c = $element.children().eq(0);
+ var c = $element.eq(0);
- c.addClass('content');
if(attr.hasHeader) {
c.addClass('has-header');
@@ -357,7 +356,8 @@ angular.module('ionic.ui.content', [])
if(attr.hasTabs) {
c.addClass('has-tabs');
}
- c.append(transclude($scope));
+ var e = transclude($scope);
+ console.log(e);
};
}
};
@@ -531,27 +531,31 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
this.endDrag = function(e) {
};
+ /**
+ * Push a template onto the navigation stack.
+ * @param {string} templateUrl the URL of the template to load.
+ */
this.pushFromTemplate = function(templateUrl) {
var childScope = $scope.$new();
childScope.isVisible = true;
+ // Load the given template
TemplateLoader.load(templateUrl).then(function(templateString) {
+
+ // Compile the template with the new scrope, and append it to the navigation's content area
var el = $compile(templateString)(childScope, function(cloned, scope) {
- angular.element($element[0].children[1].firstElementChild).append(cloned);
+ var content = $element[0].querySelector('.content');
+ angular.element(content).append(cloned);
});
});
};
+ /**
+ * Push a controller to the stack. This is called by the child
+ * nav-content directive when it is linked to a scope on the page.
+ */
$scope.pushController = function(scope, element) {
_this.push(scope);
-
- /*
- var old = angular.element($element[0].children[1]);
- $animate.enter(element, $element, $element[0].firstElementChild, function() {
- });
- $animate.leave(old, function() {
- });
- */
};
$scope.navController = this;
diff --git a/js/ext/angular/src/directive/ionicContent.js b/js/ext/angular/src/directive/ionicContent.js
index 7959dde402..748082d298 100644
--- a/js/ext/angular/src/directive/ionicContent.js
+++ b/js/ext/angular/src/directive/ionicContent.js
@@ -9,13 +9,12 @@ angular.module('ionic.ui.content', [])
return {
restrict: 'E',
replace: true,
- template: '',
+ template: '',
transclude: true,
compile: function(element, attr, transclude) {
return function($scope, $element, $attr) {
- var c = $element.children().eq(0);
+ var c = $element.eq(0);
- c.addClass('content');
if(attr.hasHeader) {
c.addClass('has-header');
@@ -26,7 +25,8 @@ angular.module('ionic.ui.content', [])
if(attr.hasTabs) {
c.addClass('has-tabs');
}
- c.append(transclude($scope));
+ var e = transclude($scope);
+ console.log(e);
};
}
};
diff --git a/js/ext/angular/src/directive/ionicNav.js b/js/ext/angular/src/directive/ionicNav.js
index 612e774a7c..ea28103e88 100644
--- a/js/ext/angular/src/directive/ionicNav.js
+++ b/js/ext/angular/src/directive/ionicNav.js
@@ -34,27 +34,31 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
this.endDrag = function(e) {
};
+ /**
+ * Push a template onto the navigation stack.
+ * @param {string} templateUrl the URL of the template to load.
+ */
this.pushFromTemplate = function(templateUrl) {
var childScope = $scope.$new();
childScope.isVisible = true;
+ // Load the given template
TemplateLoader.load(templateUrl).then(function(templateString) {
+
+ // Compile the template with the new scrope, and append it to the navigation's content area
var el = $compile(templateString)(childScope, function(cloned, scope) {
- angular.element($element[0].children[1].firstElementChild).append(cloned);
+ var content = $element[0].querySelector('.content');
+ angular.element(content).append(cloned);
});
});
};
+ /**
+ * Push a controller to the stack. This is called by the child
+ * nav-content directive when it is linked to a scope on the page.
+ */
$scope.pushController = function(scope, element) {
_this.push(scope);
-
- /*
- var old = angular.element($element[0].children[1]);
- $animate.enter(element, $element, $element[0].firstElementChild, function() {
- });
- $animate.leave(old, function() {
- });
- */
};
$scope.navController = this;
diff --git a/scss/ionic/_scaffolding.scss b/scss/ionic/_scaffolding.scss
index f2ce07394d..8343b3a491 100644
--- a/scss/ionic/_scaffolding.scss
+++ b/scss/ionic/_scaffolding.scss
@@ -70,27 +70,14 @@ body, .ionic-body {
transform: translateZ(0px);
}
-.content-wrapper {
- position: absolute;
- top: 0;
- overflow: auto;
- width: 100%;
- height: 100%;
- -webkit-overflow-scrolling: touch;
-}
-.content-plain {
+.content {
position: absolute;
width: 100%;
top: 0;
bottom: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
- &.has-header {
- }
-
- &.has-footer {
- }
}
// Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab.