Question: i have a button

```
   <button type='button" ng-click="toast()">

```

i simply want to add a functionality to shoe toast message as hello world, while clicking the button.

give me each steps to do it?

is it possible?

Answer: 
It is of course possible. 

```
 <button type='button" ng-click="toast()">

```

**JS** Using ionic functions

```
    $scope.toast = function(){
      $ionicLoading.show({
            template: 'Hello World'
        });
      $timeout(function() {
            $ionicLoading.hide();
        }, 1000);
    }

```

and don't forget to inject 

```
$ionicLoading

```

and 

```
$timeout

```

Or you can use plugin also for toast
<http://ngcordova.com/docs/plugins/toast/>
it's one line code for show like a toast 

```
                $ionicLoading.show({
                    template: 'Connection Failed',
                    noBackdrop: true,
                    duration: 1000
                });

```

otherwise used [ngCordova Toast](http://ngcordova.com/docs/plugins/toast/) plugin.

thanks.