More Nav WIP

This commit is contained in:
Max Lynch
2013-11-01 00:36:53 -05:00
parent ced8ac3dc1
commit 4b0a6ac7af
3 changed files with 11 additions and 4 deletions

View File

@ -585,7 +585,6 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
*/
this.pushFromTemplate = function(templateUrl) {
var childScope = $scope.$new();
childScope.isVisible = true;
// Load the given template
TemplateLoader.load(templateUrl).then(function(templateString) {
@ -650,6 +649,8 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
return function($scope, $element, $attr, navCtrl) {
var lastParent, lastIndex, childScope, childElement;
$scope.isVisible = true;
$scope.$watch('isVisible', function(value) {
// Taken from ngIf
if(childElement) {
@ -662,7 +663,7 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
}
if(value) {
childScope = $scope;
childScope = $scope.$new();
transclude(childScope, function(clone) {
childElement = clone;