title: Using Base64 encoding in Angular 4
body: <p>I want to send the username and password to the server using Base64 encoding.</p>
  
  <p>I found that I can import the following module using npm:</p>
  
  <pre><code>    npm install --save angular-base64
  </code></pre>
  
  <p>I have verified that following folder is created in my project foler: node_modules\angular-base64</p>
  
  <p>In my component.js file I tried to use any of the following line to import the component:</p>
  
  <pre><code>    import 'angular-base64/angular-base64'; 
  </code></pre>
  
  <p>It does not complain about the importing but when I try to use following line:</p>
  
  <pre><code>    headers.append('Authorization', 'Basic ' + base64.encode('username:temppass'));
  </code></pre>
  
  <p>It says "<strong>Can not find base64</strong>". </p>