The unofficial IpStack SDK for AngularJS (AKA Angular 1)
You can get it on npm.
$ npm install --save ngIpStack
<script type="text/javascript" src="/ngipstack/dist/ngIpStack.min.js"></script>
var app = angular.module('myModule', ['ipStack']);
app.controller('myController', ['$scope', 'requester',
function myController($scope, requester) {
requester.setApiKey('your-api-key-ip-stack');
console.log(requester.getApiKey());
}
]);
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);
});
}
]);
$ yarn install
$ gulp build
$ gulp test