Add a refresh on a button

I look the tutorial for doing a refresh of a screen into my app, so i look ion-refresh function, but is there a way to attribute this function to a button (an a href tag) else the ion-refresh tool?

for example when i push i want that the screen does the refresh
is possible?

I edited this codepen to refresh when a button is pressed

  <button class="button button-clear" ng-click="doRefresh()">
   Push to Refresh

“doRefresh()” is the function you will be calling.


I do in this way

    <ion-refresher on-refresh="remMedia()">
    <div class="row">
      <div class="col">
        <ion-scroll direction="x" style="height:200px; min-height: 200px; overflow: scroll; white-space: nowrap;">
          <img ng-repeat="image in images" ng-src="{{urlForImage(image)}}" style="height:200px; padding: 5px 5px 5px 5px;"/>
          <button class="button button-block button-large button-stable icon-left ion-plus" ng-click="addMedia()">Aggiungi immagine</button>
          <button class="button button-block button-large button-stable icon-left ion-minus" ng-click="remMedia()">Pulisci</button>

so when I push the second button I want that my screen is refreshed

  $scope.remMedia = function() {
    $timeout( function () {
    }, 1000);

this is the controller of the button, so the localStorage is clear regular and correctly but the page doesn’t refresh.


Well what exactly do you mean by “refresh”

I see


what exactly are you trying to accomplish with that?

Is it supposed to “refresh” with the new Image that was added?

no, when i remove the images i want that the screen is reloaded or refreshes…