title: how to decode base64 encoded data into ascii in angularjs
body: <p>im getting json object from the api , in that object one field is encoded with base 64 format. after getting the response i need to decode the base64 data and need to show in the plain text.
  sample data</p>
  
  <pre><code>{"id":33132,"dataFormat":"TEVOOjA="}//base64 to ascii i.e LEN:0
  </code></pre>
  
  <p>desired output - LEN:0</p>
  
  <pre><code> &lt;script&gt;
              var app = angular.module('myApp', []);
              app.controller('myCtrl', function ($scope, $http) {
                  $http.get('url', {
                      headers: { 'Authorization': 'Basic a2Vybyt==' }
                  })
                      .then(function (response) {
                     $scope.names = response.data;
                     $scope.EncodedData = names.dataFrame;
                     $scope.decodedFrame = atob(EncodedData);
                  });
              });
      &lt;/script&gt;
  &lt;h2&gt;{{names.decodedFrame }}&lt;/h2&gt;
  </code></pre>