mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
More Nav WIP
This commit is contained in:
5
js/ext/angular/src/directive/ionicNav.js
vendored
5
js/ext/angular/src/directive/ionicNav.js
vendored
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user