mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(ionNavAnimation): <a href="#/page" ion-nav-animation="slide-in-up">
This commit is contained in:
10
js/ext/angular/src/directive/ionicViewState.js
vendored
10
js/ext/angular/src/directive/ionicViewState.js
vendored
@@ -295,7 +295,6 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
};
|
||||
}])
|
||||
|
||||
|
||||
.directive('ionNavView', ['$ionicViewService', '$state', '$compile', '$controller', '$animate',
|
||||
function( $ionicViewService, $state, $compile, $controller, $animate) {
|
||||
// IONIC's fork of Angular UI Router, v0.2.7
|
||||
@@ -307,9 +306,13 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
terminal: true,
|
||||
priority: 2000,
|
||||
transclude: true,
|
||||
controller: function() {}, //noop controller so this can be required
|
||||
controller: ['$scope', function($scope) {
|
||||
this.setNextAnimation = function(anim) {
|
||||
$scope.$nextAnimation = anim;
|
||||
};
|
||||
}],
|
||||
compile: function (element, attr, transclude) {
|
||||
return function(scope, element, attr) {
|
||||
return function(scope, element, attr, navViewCtrl) {
|
||||
var viewScope, viewLocals,
|
||||
name = attr[directive.name] || attr.name || '',
|
||||
onloadExp = attr.onload || '',
|
||||
@@ -351,7 +354,6 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
if (locals === viewLocals) return; // nothing to do
|
||||
var renderer = $ionicViewService.getRenderer(element, attr, scope);
|
||||
|
||||
|
||||
// Destroy previous view scope
|
||||
if (viewScope) {
|
||||
viewScope.$destroy();
|
||||
|
||||
Reference in New Issue
Block a user