title: Is it possible to format Angular server-side based on user data?
body: <p>In Angular 9 is there a way to build my Angular app and then whenever the client requests the page modify it based on data sent in that request?</p>
  
  <p>For example run it through an Express templating engine such as EJS or PUG (aka Jade)?</p>
  
  <p>The purpose behind this is that I need to ensure that certain parts of my application are never sent to the client unless they have a specific authentication token.</p>
  
  <p>Here's an example of what I want (and works) in EJS:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;Hello!&lt;/div&gt;
  
  &lt;% if (username === "Tester") { %&gt;
      &lt;div&gt;This contains sensitive admin forms!&lt;/div&gt;
      &lt;div&gt;People shouldn't know that these exist!&lt;/div&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>This is possible in Angular from what I understand, however either user information isn't available as it's not compiling at runtime, or it has to be processed by the client - which is a major security issue.</p>
  
  <p>Is there any way to get this, or something similar to work in Angular?</p>