Add button to ionic footer in specific controller

I want to add some command button in two side of my ionic footer in many of my controller. For example in FirstController I want Add and Edit button and in SecondController I want Remove and Send Button.

I add this to my main layout but this is static:

<div class="bar bar-footer bar-balanced">
  <div class="title">My Program</div>
  <button class="button button-outline button-light" ng-click="add()"><i class="ion-arrow-left-c"></i></button>
  <button class="button button-outline button-light" ng-click="edit()"><i class="ion-arrow-right-c"></i></button>
</div>

Please guide me how to do this in ionic framework and angular.

Thanks for your attention

My approach :

  1. Move your code for Add and Edit Buttons, and Remove and Send Button to different Service [1st and 2nd Service].

  2. Create a middle man service, containing references to both of the services declared above [3rd Service].

    this service will contain two generic methods, i.e. method1 and method2.

Now in your controllers, add reference to the 3rd Service.

yourApp.controller("myController", function(thirdService) {
    $scope.thirdService = thirdService;
    $scope.textForButton1 = "Text Based on Controller";
    $scope.textForButton2 = "Text Based on Controller";
});

now, in your html :

<div class="bar bar-footer bar-balanced">
  <div class="title">My Program</div>
  <button class="button button-outline button-light" ng-click="thirdService.handleFirstButton()"><i class="ion-arrow-left-c">{{textForButton1}}</i></button>
  <button class="button button-outline button-light" ng-click="thirdService.handleSecondButton()"><i class="ion-arrow-right-c">{{textForButton2}}</i></button>
</div>

Assuming that each of your controllers are mapped to pages referenced in different routes, you can decide which method to invoke based on the route.

i.e. in your third Service :

app.service('thirdService', function($http, $location, $state) {
    this.handleFirstButton = function() {
        switch ($state.current.name.toString().toLowerCase().trim()) {
        }
    };

    this.handleSecondButton = function() {
        switch ($state.current.name.toString().toLowerCase().trim()) {
        }
    };
});