https://github.com/fixate/angular-social-links
Flexible and easy social sharing directives for Twitter, Google plus and Facebook
https://github.com/fixate/angular-social-links
Last synced: 13 days ago
JSON representation
Flexible and easy social sharing directives for Twitter, Google plus and Facebook
- Host: GitHub
- URL: https://github.com/fixate/angular-social-links
- Owner: fixate
- Created: 2014-06-16T09:31:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-11-12T15:29:01.000Z (over 4 years ago)
- Last Synced: 2025-03-31T19:11:08.287Z (about 1 month ago)
- Language: CoffeeScript
- Homepage: http://fixate.github.io/angular-social-links/demo/
- Size: 70.3 KB
- Stars: 44
- Watchers: 7
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Social Sharing Links
Flexible and easy social sharing directives for Twitter, Google Plus, Facebook, Pinterest, StumbleUpon, LinkedIn, and Reddit.
**NOTE:** This module is for AngularJS only, not Angular.
## Installation
Bower:
```shell
bower install angular-social-links
```## Usage
```javascript
angular.module('myApp', ['socialLinks']);
```Angular social links will automatically use the absolute URL of the current page:
```html
share on twitter
share on twitter
share on facebook
share on google plus
share on pinterest
share on linkedin
share on stumbleupon
share on reddit
share on vk.com
share on ok.ru
share on xing
```but you can define custom URLs too:
```html
share on twitter
share on facebook
share on google plus
share on pinterest
share on linkedin
share on stumbleupon
share on reddit
share on vk.com
share on ok.ru
share on xing
```and custom click handlers for all directives:
```html
share on twitter
```you could set custom width and height for window:
```html
share on twitter
```You can use `$event` (click event object) and `$url` (the share link url).
This will prevent the popup window from coming up. If you don't use `$event.preventDefault`, the link will navigate as usual.## Build
```shell
npm install
grunt build
```### License
MIT: http://fixate.mit-license.org/