Giter Site home page Giter Site logo

mustaphaessa / angular-social-links Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fixate/angular-social-links

0.0 1.0 0.0 728 KB

Flexible and easy social sharing directives for Twitter, Google plus and Facebook

Home Page: http://fixate.github.io/angular-social-links/demo/

CoffeeScript 48.70% HTML 51.30%

angular-social-links's Introduction

Angular Social Sharing Links

Flexible and easy social sharing directives for Twitter, Google Plus, Facebook, Pinterest, StumbleUpon, LinkedIn, and Reddit.

Installation

Bower:

bower install angular-social-links

Usage

angular.module('myApp', ['socialLinks']);

Angular social links will automatically use the absolute URL of the current page:

<a social-twitter>share on twitter</a>
<a social-twitter status="My custom status">share on twitter</a>
<a social-facebook>share on facebook</a>
<a social-gplus>share on google plus</a>
<a social-pinterest media="http://lorempixel.com/100/100/nature/1">share on pinterest</a>
<a social-linkedin>share on linkedin</a>
<a social-stumbleupon>share on stumbleupon</a>
<a social-reddit>share on reddit</a>
<a social-vk>share on vk.com</a>
<a social-ok>share on ok.ru</a>
<a social-xing>share on xing</a>

but you can define custom URLs too:

<a social-twitter custom-url="http://google.com">share on twitter</a>
<a social-facebook custom-url="http://google.com">share on facebook</a>
<a social-gplus custom-url="http://google.com">share on google plus</a>
<a social-pinterest media="http://lorempixel.com/100/100/nature/1" custom-url="http://google.com">share on pinterest</a>
<a social-linkedin custom-url="http://google.com">share on linkedin</a>
<a social-stumbleupon custom-url="http://google.com">share on stumbleupon</a>
<a social-reddit custom-url="http://google.com">share on reddit</a>
<a social-vk custom-url="http://google.com">share on vk.com</a>
<a social-ok custom-url="http://google.com">share on ok.ru</a>
<a social-xing custom-url="http://google.com">share on xing</a>

and custom click handlers for all directives:

<a social-twitter custom-handler="$event.preventDefault();controller.doSomething($url)">share on twitter</a>

you could set custom width and height for window:

<a social-twitter social-width="600" social-height="300">share on twitter</a>

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

npm install
grunt build

License

MIT: http://fixate.mit-license.org/

angular-social-links's People

Contributors

elisabeth21 avatar korkota avatar larrybotha avatar sdbondi avatar wigth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.