cb-directives-sharewindow
v0.1.0
Published
A simple directive to open share urls in a popup window
Downloads
2
Maintainers
Readme
This directive makes it easy to open a social-media-share link inside a popup window. (But it will also work with any other link)
Usage
Install
npm install -S cb-directives-sharewindow
Require in your angular app
const angular = require('angular'),
myAngularApp = angular.module('myApp', [
require('cb-directives-sharewindow')
]);
Use inside your website
<!-- works with static links -->
<a share-window href="https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/CampaigningBureau/cb.directives.shareWindow">Share this!</a>
<!-- also works with dynamic links -->
<a share-window ng-href="{{ 'https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/CampaigningBureau/cb.directives.shareWindow' }}">Share this!</a>