{"id":19339705,"url":"https://github.com/rubenv/angular-rt-popup","last_synced_at":"2025-04-23T02:30:53.591Z","repository":{"id":17013715,"uuid":"19777131","full_name":"rubenv/angular-rt-popup","owner":"rubenv","description":"A better version of the Bootstrap popover, for Angular.JS","archived":false,"fork":false,"pushed_at":"2015-06-02T08:35:59.000Z","size":386,"stargazers_count":22,"open_issues_count":4,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T08:46:23.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rubenv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-14T11:38:50.000Z","updated_at":"2019-08-13T15:41:36.000Z","dependencies_parsed_at":"2022-08-29T04:31:29.989Z","dependency_job_id":null,"html_url":"https://github.com/rubenv/angular-rt-popup","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenv%2Fangular-rt-popup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenv%2Fangular-rt-popup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenv%2Fangular-rt-popup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenv%2Fangular-rt-popup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenv","download_url":"https://codeload.github.com/rubenv/angular-rt-popup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250357565,"owners_count":21417307,"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":[],"created_at":"2024-11-10T03:23:27.451Z","updated_at":"2025-04-23T02:30:53.240Z","avatar_url":"https://github.com/rubenv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-rt-popup\n\n\u003e A better version of the Bootstrap popover, for Angular.JS\n\n[![Build Status](https://travis-ci.org/rubenv/angular-rt-popup.png?branch=master)](https://travis-ci.org/rubenv/angular-rt-popup)\n\n## Installation\nAdd angular-rt-popup to your project:\n\n```\nbower install --save angular-rt-popup\n```\n\nAdd it to your HTML file:\n\n```html\n\u003cscript src=\"bower_components/angular-rt-popup/dist/angular-rt-popup.min.js\"\u003e\u003c/script\u003e\n```\n\nReference it as a dependency for your app module:\n\n```js\nangular.module('myApp', ['rt.popup']);\n```\n\n### Requirements\n\nThis module requires:\n\n* Angular.JS (obviously)\n* JQuery (mainly for `$.contains`)\n\n## Usage\n\nUse the `popup-show` directive to show a popup:\n\n```html\n\u003ca popup-show=\"popup.html\" class=\"btn btn-primary\"\u003eShow popup!\u003c/a\u003e\n```\n\nThis will load `popup.html` and show it in the popup. Use [Bootstrap](http://getbootstrap.com/) classes for styling the popup (I recommend that you load the Bootstrap CSS to make it look pretty).\n\nHere's an example:\n\n```html\n\u003ch3 class=\"popover-title\"\u003eHello!\u003c/h3\u003e\n\n\u003cdiv class=\"popover-content\"\u003e\n    \u003cp\u003eThis is a popup\u003c/p\u003e\n\n    \u003ca ng-click=\"hidePopover()\" class=\"btn btn-primary\"\u003eGo away!\u003c/a\u003e\n\u003c/div\u003e\n```\n\nYou can use `hidePopover()` inside the popup to hide the popover. Any click outside the popup also closes it.\n\n### `popup-placement`\n\nYou can control the placement of the popup by adding a `popup-placement` attribute.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-placement=\"right\"\u003eShow popup!\u003c/a\u003e\n```\n\nSupported values: `right`, `left`, `bottom`, `bottom-left`, `top`.\n\n### `popup-placement-fn`\n\nA function that can control the placement of a popup based on the given screen location. It receives an anchor object and should return `right`, `left`, `bottom`, `bottom-left` or `top`.\n\nThe anchor object has the following properties: `top`, `left`, `width`, `height`.\n\nIf this function is defined it will override the placement attribute.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-placement-fn=\"placement\"\u003eShow popup!\u003c/a\u003e\n```\n\n```javascript\nscope.placement = function (anchor) {\n    return anchor.left \u003c $window.width / 2 ? \"right\" : \"left\";\n};\n```\n\n### `popup-if`\n\nPopups can be made conditional by adding a `popup-if` attribute. The popup will only be shown if the expression is true.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-if=\"showInPopup\"\u003eShow popup!\u003c/a\u003e\n```\n\n### `popup-class`\n\nAdds extra classes to the popover wrapper.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-class=\"custom-style\"\u003eShow popup!\u003c/a\u003e\n```\n\n### `popup-shown`\n\nA function that will be called when the popup is shown.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-shown=\"onShown()\"\u003eShow popup!\u003c/a\u003e\n```\n\n### `popup-hidden`\n\nA function that will be called when the popup is hidden.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-hidden=\"onHidden()\"\u003eShow popup!\u003c/a\u003e\n```\n\n### `popup-auto-show`\n\nWill auto show the popup when it evaluates to true.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-auto-show=\"showIt\"\u003eShow popup!\u003c/a\u003e\n```\n\n### `popup-overlap`\n\nYou can control the overlap position with the anchor element by adding a `popup-overlap` attribute.\n\n```html\n\u003ca popup-show=\"popup.html\" popup-overlap=\"10\"\u003eShow popup!\u003c/a\u003e\n```\n\n## License\n\n    (The MIT License)\n\n    Copyright (C) 2014-2015 by Ruben Vermeersch \u003cruben@rocketeer.be\u003e\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenv%2Fangular-rt-popup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubenv%2Fangular-rt-popup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenv%2Fangular-rt-popup/lists"}