{"id":21404039,"url":"https://github.com/rajeshwarpatlolla/ionic-toast","last_synced_at":"2025-04-09T14:10:30.321Z","repository":{"id":34135293,"uuid":"37968479","full_name":"rajeshwarpatlolla/ionic-toast","owner":"rajeshwarpatlolla","description":"'ionic-toast' bower component for ionic framework applications","archived":false,"fork":false,"pushed_at":"2019-11-02T16:28:51.000Z","size":50,"stargazers_count":157,"open_issues_count":11,"forks_count":57,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-02T07:47:09.793Z","etag":null,"topics":["angularjs","hybridapp","ionic","package","toast"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajeshwarpatlolla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.paypal.me/rajeshwarpatlolla/10"]}},"created_at":"2015-06-24T07:09:50.000Z","updated_at":"2023-07-11T01:22:17.000Z","dependencies_parsed_at":"2022-07-13T16:47:57.300Z","dependency_job_id":null,"html_url":"https://github.com/rajeshwarpatlolla/ionic-toast","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshwarpatlolla%2Fionic-toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshwarpatlolla%2Fionic-toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshwarpatlolla%2Fionic-toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshwarpatlolla%2Fionic-toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajeshwarpatlolla","download_url":"https://codeload.github.com/rajeshwarpatlolla/ionic-toast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054195,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angularjs","hybridapp","ionic","package","toast"],"created_at":"2024-11-22T16:12:20.460Z","updated_at":"2025-04-09T14:10:30.297Z","avatar_url":"https://github.com/rajeshwarpatlolla.png","language":"JavaScript","funding_links":["https://www.paypal.me/rajeshwarpatlolla/10"],"categories":[],"sub_categories":[],"readme":"[![bitHound Score](https://www.bithound.io/github/rajeshwarpatlolla/ionic-toast/badges/score.svg)](https://www.bithound.io/github/rajeshwarpatlolla/ionic-toast)\n\n## Introduction:\n\nThis is an `ionic-toast` bower component which can be used with any Ionic framework's application.\n\n[View Demo](http://rajeshwarpatlolla.github.io/ionic-toast-demo/demo/ \"Demo\")\n\n\n## Prerequisites.\n\n**1)** node.js, bower and gulp.\n\n## How to use:\n\n**1)** In your project repository install the ionic-toast using bower\n\n    bower install ionic-toast --save\n\nThis will install the latest version released. If you wish to install a specific version please use `bower install ionic-toast#\u003cversion number\u003e`\n\n**2)** Give the path of `ionic-toast.bundle.min.js` in your `index.html` file.\n\n````html\n\u003c!-- path to ionic / angularjs files--\u003e\n\u003cscript src=\"lib/ionic-toast/dist/ionic-toast.bundle.min.js\"\u003e\u003c/script\u003e\n````\n\n**3)** In your application module inject the dependency `ionic-toast`, in order to work with the ionic toast.\n\n````javascript\nangular.module('mainModuleName', ['ionic', 'ionic-toast']){\n //\n}\n````\n\n**4)** Inject 'ionicToast' in your controller.\n\n````javascript\n.controller('HomeCtrl', ['$scope', 'ionicToast', function($scope, ionicToast) {\n  //code here\n}])\n````\n\n**5)** In your template, you can use like below\n\n````html\n\u003cbutton class=\"button button-block\" ng-click=\"showToast()\"\u003eShow Toast at top with close\u003c/button\u003e\n````\n\n**6)** In your controller you have to define a function like below to show the toast\n\n````javascript\n$scope.showToast = function(){\n\u003c!-- ionicToast.show(message, position, stick, time); --\u003e\n  ionicToast.show('This is a toast at the top.', 'top', true, 2500);\n};\n````\n\nThe arguments are as follows. The order of arguments should not be changed.\n\na) `message` is the first argument, which takes any string message.\n\nb) `position`(Optional) is the second argument, which takes on of the three values(top, middle, bottom). default position is `top`.\n\nc) `stick`(Optional) is the third argument, which takes either `true` or `false`. Default value is false.\n- If the value is true, the toast will not close automatically. It will be closed once you click on the close button.\n- If the value is false, the toast will close automatically, after the given time.\n\nd) `timeout`(Optional) 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. The default value is 4000 milli seconds.\n\ne) `background`(Optional) is the fifth argument, which takes the background color in hexadecimal, rgb() or rgba(). If the value is null the background color is `rgba(0, 0, 0, 0.75)`.\n\n**7)** In your controller you have to define a function like below to hide the toast\n\n````javascript\n$scope.hideToast = function(){\n  ionicToast.hide();\n};\n````\n\n\n## Screen Shots:\n\nOnce you are successfully done with the above steps, you should be able to see the below screen shots.\nI have used three buttons here.\n\nThe first screen shot shows only the buttons before clicking on them.\nOnce you click on the button you should see the remaining screen shots.\n\n![ionic-toast buttons](https://lh3.googleusercontent.com/Fc4fUe9_k6DktTMoNrpih_z5sSNoZs9XHuiyn4AcClw=w320-h568-no \"ionic-toast buttons\")\n![ionic-toast top](https://lh3.googleusercontent.com/VDO5p9Z9KH6tC7zpTTk6mbkchKKBA4VYWpZuqLp9Jzc=w320-h568-no \"ionic-toast top\")\n![ionic-toast middle](https://lh3.googleusercontent.com/J7n3YRhRx68hIQmKLRJEKq6QfkxkAD7y_Jqc9eFDOtk=w320-h568-no \"ionic-toast middle\")\n![ionic-toast bottom](https://lh3.googleusercontent.com/MQyAFN9S8d8Pd05XALFcuhPiY_LNlKEIS9yWh-WKTh0=w320-h568-no \"ionic-toast bottom\")\n\n## Versions:\n\n### 1) v0.1.0\nThe whole `ionic-toast` component functionality has been implemented, and it can be installed with the command `bower install ionic-toast --save`\n\n### 2) v0.1.1\nBug Fix\n\n### 3) v0.2.0\nLint issues fixed, npm packages updated, main files added in the package.json, changes in the gulp tasks.\n\n### 4) v0.3.0\nCode modularity implemented, npm packages updated.\n\nJS and CSS file is combined into one `ionic-toast.bundle.min.js` file in the dist folder.\n\n### 5) v0.4.0\nBug fix.\n\n### 6) v0.4.1\n[Issue#21](https://github.com/rajeshwarpatlolla/ionic-toast/issues/21)\n\n\n## License:\n[MIT](https://github.com/rajeshwarpatlolla/ionic-toast/blob/master/LICENSE.md \"MIT\")\n\n## Contact:\ngmail : rajeshwar.patlolla@gmail.com\n\ngithub : https://github.com/rajeshwarpatlolla\n\ntwitter : https://twitter.com/rajeshwar_9032\n\nfacebook : https://www.facebook.com/rajeshwarpatlolla\n\npaypal : rajeshwar.patlolla@gmail.com\n\nRate / Comment : http://market.ionic.io/plugins/ionictoast\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajeshwarpatlolla%2Fionic-toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajeshwarpatlolla%2Fionic-toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajeshwarpatlolla%2Fionic-toast/lists"}