title: Angular, function return true but ng-show won't work
body: <p>showOrHide function will return true if I click a link.</p>
  
  <p>I tested this code with alert and console.log functions and it's work but if I want to test this code into ng-show or ng-hide directives it won't work. I can't understand this issue. </p>
  
  <p>Sum: function return false, if I click some link it return true
  But true and false won't work in ng-show.</p>
  
  <p>angular.js file
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.showOrHide = function (value) {
          if (typeof value !== 'undefined')
          {
              return alert(true);
              //console.log("true");
              //return true;
          }else {
              return alert(false);
              //console.log("false");
              //return false;
          }
      };
      $scope.projectId = $stateParams.projectId;
      $scope.showOrHide($stateParams.projectId);</code></pre>
  </div>
  </div>
  </p>
  
  <p>html file
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;tr ng-repeat="n in data.projects track by $index"
      ng-href="@{{n.id}}"
      ui-sref="goTo({ projectId: n.id })"&gt;
      &lt;td&gt;@{{n.project_code}}&lt;/td&gt;
      &lt;td&gt;@{{n.project_name}}&lt;/td&gt;
      &lt;td class="text-primary"&gt;will add&lt;/td&gt;
      &lt;td class="text-primary"&gt;will add&lt;/td&gt;
      &lt;td class="text-primary"&gt;@{{n.status}}&lt;/td&gt;
      &lt;td ng-show="showOrHide"&gt;test&lt;/td&gt;
  &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>