title: ORIGINAL EXCEPTION: Encrypt is not defined
body: <p>I am using <code>Ionic 2 rc3</code>. I am trying to import/include a js file in one of the components.</p>
  
  <p><strong>ts file</strong></p>
  
  <pre><code>// declare var require: any
  'use strict';
  // var Encrypt = require('pages/service/jsencrypt.min');
  declare var Encrypt: any;
  ...
  this.encrypter = new Encrypt.JSEncrypt();
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;script src="pages/service/jsencrypt.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Before I was using <code>Ionic 2 beta</code>, and it was working perfectly when I didn't have anything in <code>index.html</code>, and had <code>var Encrypt = require('pages/service/jsencrypt.min');</code> at the top of the ts file. Since the upgrade to <code>rc3</code>, I cannot seem to get it to import/include the <code>js</code> file.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In the <code>jsencrypt.js</code> file, it has the following code:</p>
  
  <pre><code>var JSEncrypt = function (options) {
      options = options || {};
      this.default_key_size = parseInt(options.default_key_size) || 1024;
      this.default_public_exponent = options.default_public_exponent || '010001'; //65537 default openssl public exponent for rsa key type
      this.log = options.log || false;
      // The private and public key.
      this.key = null;
  };
  </code></pre>
  
  <p>In my ts file, I need to get a handle on <code>JSEncrypt</code>. I used to do the following which worked in the <code>beta</code>:</p>
  
  <pre><code>this.encrypter = new Encrypt.JSEncrypt();
  </code></pre>
  
  <p>If I try the following:</p>
  
  <pre><code>this.encrypter = this.JSEncrypt();
  </code></pre>
  
  <p>I get this error in the CLI:</p>
  
  <pre><code>Property 'JSEncrypt' does not exist on type 'PersonService'.
  </code></pre>
  
  <p>How do I get a handle on <code>JSEncrypt</code>?</p>
  
  <p>Thanks</p>