ngipstack

1.0.10 • Public • Published

ngIpStack

Build Status js-standard-style npm

The unofficial IpStack SDK for AngularJS (AKA Angular 1)

Requirements

Installation

Add library

You can get it on npm.

$ npm install --save ngIpStack
<script type="text/javascript" src="/ngipstack/dist/ngIpStack.min.js"></script>

Add dependency

var app = angular.module('myModule', ['ipStack']);

Usage

Set your api key

app.controller('myController', ['$scope', 'requester',
    function myController($scope, requester) {
 
        requester.setApiKey('your-api-key-ip-stack');
 
        console.log(requester.getApiKey());
 
    }
]);

Get your IP Address

app.controller('myController', ['$scope', 'requester',
    function myController($scope, requester) {
 
        requester.setApiKey('your-api-key-ip-stack');
 
        requester.getIp().then(function(res){
 
          var myIpAddress = res.data.ip;
 
          console.log(myIpAddress);
 
        });
 
    }
]);

Build

$ yarn install
$ gulp build

Tests

$ gulp test

Package Sidebar

Install

npm i ngipstack

Weekly Downloads

2

Version

1.0.10

License

ISC

Unpacked Size

15.5 MB

Total Files

312

Last publish

Collaborators

  • eduhrcastro