HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/topswtw.komma.pro/wwwroot/js/temp/postal.angular.js
(function($) {

    var app = angular.module('checkout',[]);
    /**
    app.controller('PostalController',[ '$scope', '$http', function($scope, $http)
    {
        $scope.postal = '';
        $scope.street = '';
        $scope.city = '';
        $scope.country = '';

        $scope.requestPostal = function()
        {
            var postal = $scope.postal;

            // Format postal

            if( postal == '') return;

            // Get result
            $http({
                url: 'http://api.postcodeapi.nu/' + postal,
                method: 'GET',
                headers: {
                     'Accept': '* / *',
                     'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
                     'Accept-Language': 'en',
                     'Api-Key': '22ecec69fa7738249455133f481be1b4b627bff3'
                }

            }).success(function(data)
            {
                $scope.street = data.resource.street;
                $scope.city = data.resource.town;
                $scope.country = 'nl';
            });
        };
    }]);
    */
})(jQuery);