Skip to content
Work in progress
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
sample
specs
src
.babelrc
.gitignore
.travis.yml
README.md
gulpfile.babel.js
karma.conf.js
package.json
yarn.lock

README.md

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
You can’t perform that action at this time.