mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
GITHUB!
This commit is contained in:
10
js/ext/angular/src/directive/ionicNav.js
vendored
10
js/ext/angular/src/directive/ionicNav.js
vendored
@ -40,6 +40,7 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
|
|||||||
*/
|
*/
|
||||||
this.pushFromTemplate = function(templateUrl) {
|
this.pushFromTemplate = function(templateUrl) {
|
||||||
var childScope = $scope.$new();
|
var childScope = $scope.$new();
|
||||||
|
childScope.isVisible = true;
|
||||||
|
|
||||||
// Load the given template
|
// Load the given template
|
||||||
TemplateLoader.load(templateUrl).then(function(templateString) {
|
TemplateLoader.load(templateUrl).then(function(templateString) {
|
||||||
@ -122,14 +123,13 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
|
|||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
restrict: 'CA',
|
restrict: 'ECA',
|
||||||
require: '^navs',
|
require: '^navs',
|
||||||
transclude: 'element',
|
transclude: 'element',
|
||||||
compile: function(element, attr, transclude) {
|
compile: function(element, attr, transclude) {
|
||||||
return function($scope, $element, $attr, navCtrl) {
|
return function($scope, $element, $attr, navCtrl) {
|
||||||
var lastParent, lastIndex, childScope, childElement;
|
var lastParent, lastIndex, childScope, childElement;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
$scope.title = $attr.title;
|
$scope.title = $attr.title;
|
||||||
$scope.slideAnimation = $attr.slideAnimation || '';
|
$scope.slideAnimation = $attr.slideAnimation || '';
|
||||||
@ -143,9 +143,6 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
|
|||||||
|
|
||||||
// Push this controller onto the stack
|
// Push this controller onto the stack
|
||||||
$scope.pushController($scope, $element);
|
$scope.pushController($scope, $element);
|
||||||
=======
|
|
||||||
$scope.isVisible = true;
|
|
||||||
>>>>>>> e8bd9a5dee77d29b746115546a51b1a4a3d46246
|
|
||||||
|
|
||||||
$scope.$watch('isVisible', function(value) {
|
$scope.$watch('isVisible', function(value) {
|
||||||
// Taken from ngIf
|
// Taken from ngIf
|
||||||
@ -161,10 +158,7 @@ angular.module('ionic.ui.nav', ['ionic.service.templateLoad', 'ionic.service.ges
|
|||||||
// Check if this is visible, and if so, create it and show it
|
// Check if this is visible, and if so, create it and show it
|
||||||
if(value) {
|
if(value) {
|
||||||
childScope = $scope.$new();
|
childScope = $scope.$new();
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> e8bd9a5dee77d29b746115546a51b1a4a3d46246
|
|
||||||
transclude(childScope, function(clone) {
|
transclude(childScope, function(clone) {
|
||||||
childElement = clone;
|
childElement = clone;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user