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

@ -40,7 +40,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) {
@ -105,6 +104,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) {
@ -117,7 +118,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;