How to change the title of the button inside the controller?


I have a button inside the ion-nav-bar as shown below:

Tasks Edit

Inside the controller I handle the edit button as shown below:

$scope.edit = function() {
$scope.shouldShowDelete = !$scope.shouldShowDelete;

Now, how can I change the title of the button from inside the controller. I know I can use jQuery but is there any ionic framework specific way of achieving it?

<button ng-click="edit()" ng-bind="buttonTitle"></button>

Updating the $scope.buttonTitle in the controller should change it in the view as well.
Does that work?