ng-twitter
v0.0.4
Published
AngularJS directive twitter tweets addict display.
Downloads
19
Readme
ng-twitter
Angular directive tweets display.
In construction
Installation
Using npm:
npm install ng-twitter
How to use it
You should already have script required for Angular
<script type="text/javascript" src="angular.min.js"></script>
to the list above, you should add:
<link rel="stylesheet" type="text/css" href="ng-twitter.min.css">
<script type="text/javascript" src="ng-twitter.min.js"></script>
Then, inject ngTwitter
in your application module:
angular.module('myApp', ['ngTwitter']);
and then just add an div
with tweets
directive name attribute, authKey
and 'hashtag' scope variable attribute.
<div tweets key="authKey" hashtag="hashtag" button="true" count="15" refresh="60"/>
authKey
, 'hashtag' are your scope authentication key variable.
$scope.authKey = 'bzJZSlN4ZnJUYWhyeXdub2R4MzJBOkFHSmw5MnJIeEFTRkpYVW9BSm8zMEpTQzU2Wm0zNFZxZmFVZFh1TUZWamc=';
$scope.hashtag = 'football';
Attribute
key
: scope json variable objectkey
: scope json variable objectkey
: scope json variable objectkey
: scope json variable objectkey
: scope json variable object
Example with all above features:
<div ng-app="myApp" ng-controller="ctrl">
<div tweets key="authKey" hashtag="hashtag" button="true" count="5" refresh="10"/>
</div>
Build
You can run the tests by running
npm install
or
npm test
assuming you already have grunt
installed, otherwise you also need to do:
npm install -g grunt-cli
License
The MIT License (MIT)
Copyright (c) 2013 Julien Valéry
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.