title: Data in angular is getting displayed and disappearing when used $scope
body: <p>My ejs file is :<br>
       
      
      
      Express App
      
      
      
      
      
      
      
      </p>
  
  <pre><code>&lt;/head&gt;
  &lt;body data-ng-app="indexHomepage" data-ng-controller="indexController"&gt;
  &lt;div style="margin:100px;"&gt;
  &lt;h1&gt;Express!&lt;/h1&gt;
  
  
      &lt;table data-ng-repeat="user in users"&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;h4 align="center"&gt;&lt;br/&gt;&lt;br/&gt;{{user}}&lt;br/&gt;&lt;/h4&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  
  
  &lt;/div&gt;
  
  &lt;script src="controller/indexHomepageController.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and my angular controller code is :</p>
  
  <pre><code>  var indexHomepage = angular.module('indexHomepage', []);
  
    indexHomepage.controller('indexController', ['$scope', '$http',     function ($scope, $http) {
  
  
    $scope.getUsers = function () {
        $http.get('/getUsers').success(function (response) {
  
            if (response.responseErrorCode == 503) {
                console.log("No users in database");
            }
            else {
  
                $scope.users = response;
            }
  
        });
    }
  
    }]);
  </code></pre>
  
  <p>when I put console.log in else part of controller instead of setting $scope.users, even then it's showing up and immediately getting disappeared. But if I remove the function and just keep :</p>
  
  <pre><code>      $http.get('/getUsers').success(function (response) {
  
            if (response.responseErrorCode == 503) {
                console.log("No users in database");
            }
            else {
  
                $scope.users = response;
            }
  
        });
  </code></pre>
  
  <p>here , it works.</p>
  
  <p>Is there anything that I am missing?</p>