title: How to secure page with angular (6) & server side
body: <p>There is a really good way to secure private pages with angular? (I know there is but I can't get it)..
  I searched a lot this question and all the information I was found looks the same and don't really give me a solution</p>
  
  <p><strong>How is angular can secure pages (like admin panel) with any server side?</strong> I'll explain what i mean..</p>
  
  <p>I know that we can create a server side code which go to his own storage (db etc..) and check the credentials that angular send against his credentials.</p>
  
  <p>BUT - no matter what is the answer from the server side (lets say PHP or Firebase etc..), the user can change the code in angular since it's generated into JS eventualy!</p>
  
  <p>lets say my angular code is like:</p>
  
  <pre><code>somecode..
  somecode..
  somecode..
  if (serverside.respone == true) {
      goto AdminPanel page;
  } else {
      alert('not authorized!');
  }
  somecode..
  somecode..
  somecode..
  </code></pre>
  
  <p>When I open my devtools in chrome, after I run my app (with ng serve), I can easly look into the "main.js" source file, and easly change this code to this:</p>
  
  <pre><code>somecode..
  somecode..
  somecode..
  
  if (1 == 1) {
      goto AdminPanel page;
  } else {
      alert('not authorized!');
  }
  
  somecode..
  somecode..
  somecode..
  </code></pre>
  
  <p>Then what?  ofcourse this is not secure.. (I also tried it and awre i'm right)
  Please help me understand what I missing!</p>
  
  <p>Thanks!</p>