title: Using AngularJS how to check a PDF file exist in a folder or not?
body: <p>I have a list of students.<br>
  For some students I have to show a link, and on clicking this link their progress card should load (it is a .pdf file). For others, the link should not be shown.</p>
  
  <p>I have done this by giving the same student id to their progress card and if it is this particular student then show the link; otherwise, don't show the link. I can do it this way for only 5 or 6 students. I cant do this for 1000 students.</p>
  
  <p>The following is my AngularJS code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>if (response.student_id == 'SD0001' || response.student_id == 'SD0002' || response.student_id == 'SD0004') {  
      $scope.pdfData = true;
      $scope.StudentPDFFile =  response.student_id+'.pdf';
  } else {
      $scope.pdfData = false;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"&gt;&lt;/script&gt;
  &lt;body id="ng-app" ng-app&gt;
      &lt;div ng-switch on="pdfData"&gt;
          &lt;div ng-switch-when="false"&gt;&lt;/div&gt;
          &lt;div ng-switch-when="true"&gt;
              &lt;span class="font-10"&gt;Download Performance Report&lt;/span&gt;
              &lt;a href="http://www.example.com/s-pdf/{{StudentPDFFile}}" target="_blank"&gt;­ click here&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here I haven't specified the controller, this is skeleton functionality is working for me.</p>
  
  <p>For 1000 records how I can do this?</p>