feat(ionNavAnimation): <a href="#/page" ion-nav-animation="slide-in-up">

This commit is contained in:
Andy Joslin
2014-02-26 08:34:58 -05:00
parent 4c996c7f93
commit 8354d42b4b
5 changed files with 82 additions and 12 deletions

View File

@@ -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();