mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(ionNavBackButton): only set scope variable when needed
This commit is contained in:
2
js/ext/angular/src/directive/ionicNavBar.js
vendored
2
js/ext/angular/src/directive/ionicNavBar.js
vendored
@@ -316,8 +316,8 @@ function($ionicViewService, $rootScope, $animate, $compile, $parse) {
|
||||
compile: function(tElement, tAttrs) {
|
||||
tElement.addClass('button back-button');
|
||||
return function($scope, $element, $attr, navBarCtrl) {
|
||||
$scope.$navBack = navBarCtrl.back;
|
||||
if (!$attr.ngClick) {
|
||||
$scope.$navBack = navBarCtrl.back;
|
||||
$ionicNgClick($scope, $element, '$navBack($event)');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user