Skip to content

Commit

Permalink
changes in the description
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshwarpatlolla committed Sep 11, 2015
1 parent 169439f commit 377e72a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ This is an `ionic-toast` bower component which can be used with any Ionic framew

##How to use:

1) In your project repository install the ionic-toast using bower
**1)** In your project repository install the ionic-toast using bower

bower install ionic-toast --save

This will install the latest version released.

2) Then you can see the following directory structure see in your project folder
**2)** Then you can see the following directory structure see in your project folder

Give the path of `style.css, and ionic-toast.js` in your `index.html` file.

Expand All @@ -28,29 +28,29 @@ Give the path of `style.css, and ionic-toast.js` in your `index.html` file.
<script src="lib/ionic-toast/dist/ionic-toast.bundle.min.js"></script>
````

3) In your application module inject the dependency `ionic-toast`, in order to work with the ionic toast.
**3)** In your application module inject the dependency `ionic-toast`, in order to work with the ionic toast.

````javascript
angular.module('mainModuleName', ['ionic', 'ionic-toast']){
//
}
````

4) In your controller, inject 'ionicToast'.
**4)** In your controller, inject 'ionicToast'.

````javascript
.controller('HomeCtrl', ['$scope', 'ionicToast', function($scope, ionicToast) {
//code here
}])
````

5) In your template you can use like below
**5)** In your template you can use like below

````html
<button class="button button-block" ng-click="showToast()">Show Toast at top with close</button>
````

6) In your controller you have to define a function like below to show the toast
**6)** In your controller you have to define a function like below to show the toast

````javascript
$scope.showToast = function(){
Expand All @@ -71,7 +71,7 @@ c) `stick` is the third argument, which takes either `true` or `false`.

d) `time` is the fourth argument, which takes time in milliseconds. If the value is greater than 5000, then it will be considered as 5000(5 seconds) only.

7) In your controller you have to define a function like below to hide the toast
**7)** In your controller you have to define a function like below to hide the toast

````javascript
$scope.hideToast = function(){
Expand Down

0 comments on commit 377e72a

Please sign in to comment.