title: How to get Zip code or postal code by using geolocation api in angularjs
body: <p>I am using geolocation api in angularjs .like this example: <a href="http://jsfiddle.net/LyD4Q/4/" rel="noreferrer">http://jsfiddle.net/LyD4Q/4/</a></p>
  
  <h2>HTML</h2>
  
  <pre><code> &lt;div ng-app&gt;
  &lt;div ng-controller="GeoTestCtrl"&gt;
      &lt;div ng-hide="supportsGeo"&gt;
          Your browser doesn't support geolocation
      &lt;/div&gt;
      &lt;div ng-show="supportsGeo"&gt;
    Manual digest when position received: &lt;input type="checkbox" ng-model="manualDigest"/&gt;
          &lt;br/&gt;
          &lt;button ng-click="doTest1()"&gt;
              Geo Location Test 1: window.navigator.geolocation
          &lt;/button&gt;
  
          Need to type something to trigger digest:
          &lt;input type="text" ng-model="something"/&gt;
          &lt;hr/&gt;
          Position: &lt;button ng-click="position=null"&gt;clear&lt;/button&gt;
          &lt;pre ng-bind="position|json"/&gt;
          &lt;pre ng-bind="zipcode|json"/&gt;
         &lt;/div&gt;
        &lt;/div&gt;
       &lt;/div&gt;
      &lt;hr/&gt;
  </code></pre>
  
  <h2>Javascript</h2>
  
  <pre><code>function GeoTestCtrl($scope, $window) {
  $scope.supportsGeo = $window.navigator;
  $scope.position = null;
  $scope.doTest1 = function() {
      window.navigator.geolocation.getCurrentPosition(function(position) {
          $scope.$apply(function() {
              $scope.position = position;
          });
      }, function(error) {
          alert(error);
      });
  };
  
  }
  </code></pre>
  
  <p>But I am trying to get zip code by using this. I tried with 'position.address.postalCode' but it is not working for me. Please help me about this.</p>