I man,
I’m trying to have a simple back button with a custom left arrow and without parent title.
My code is this
<body ng-controller="superController">
<ion-nav-bar class="bar-positive" >
<ion-nav-back-button class="button-clear" ng-click="myGoBack()">
<img ng-src="{{ENV.CDNURL}}assets/buttons/back_btn.png">
</ion-nav-back-button>
</ion-nav-bar>
</body>
I tried with this with no result, parent view name is displayed in the nav bar
$ionicConfigProvider.backButton.text('');
i tried also to customize the click event with ng-click=“myGoBack()” but view parent is displayed
.controller('superController',function ($scope,$ionicNavBarDelegate) {
$scope.myGoBack = function () {
$ionicNavBarDelegate.back();
};
});
i recive an error like this:
TypeError: Illegal invocation
at deprecatedWarning (http://localhost:8100/lib/ionic/js/ionic-angular.js:6173:13)
at self.back (http://localhost:8100/lib/ionic/js/ionic-angular.js:6164:5)
at http://localhost:8100/lib/ionic/js/ionic.js:98:46
at Array.forEach (native)
at DelegateInstance.caller [as back] (http://localhost:8100/lib/ionic/js/ionic.js:95:27)
at Scope.$scope.myGoBack (http://localhost:8100/scripts/app.js:129:26)
at $parseFunctionCall (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20124:18)
at http://localhost:8100/lib/ionic/js/ionic-angular.js:9959:9
at Scope.$eval (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22178:28)
at Scope.$apply (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22276:23)
I’m using this version of ionic:
“ionic”: “driftyco/ionic-bower#1.0.0-beta.14-nightly-935”,
Thank you,
Tommaso