title: angular2 ng2-bs3-modal not working with script tag load
body: <p>I have an Angular 2 app that works fine as is and I wanted to add modals to it, so I performed the installation instructions exactly like Doug said here:  <a href="https://github.com/dougludlow/ng2-bs3-modal" rel="nofollow">https://github.com/dougludlow/ng2-bs3-modal</a></p>
  
  <p>The instructions say to either use the script tag in the index.html page 
  to load the library or use the system loader.  Since all the other modules are loaded via script tags I did the script tag load for this one as well.</p>
  
  <p>Inside of my component, the import appears to get recognized okay in VSCode, as it is displaying the various items that the ng2-bs3-modal has and not showing any errors in the edit mode.</p>
  
  <p>However when I try to run the app, it doesn't run, and the developer tool shows that it is trying to make an http call to /ng2-bs3-modal/ng2-bs3-modal.   All imported modules are contained in the node_modules folder, so I'm not sure why 1) this http call is being made from the component, and 2) why it would be looking from the root folder instead of the node_modules folder.   </p>
  
  <p>On page load the error shown in dev tools console log is : </p>
  
  <pre><code>GET http://localhost:3000/ng2-bs3-modal/ng2-bs3-modal 404 (Not Found)   angular2/polyfills.js
  Error: XHR error (404 Not Found) loading http://localhost:3000/ng2-bs3-modal/ng2-bs3-modal(…)  angular2/polyfills.js
  </code></pre>
  
  <p>index.html - As I said, everything works fine before trying to add the modal.    I used the script tag inclusion, not the system version, and I have included the entire index.html file below.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;base href="/"&gt;
  
  &lt;script data-require="jquery@*" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script data-require="bootstrap@*" data-semver="3.3.6" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;   &lt;/script&gt;
  
  
  &lt;script src="node_modules/es6-shim/es6-shim.min.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/systemjs/dist/system-polyfills.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"&gt;
  &lt;/script&gt;
  
  &lt;script src="node_modules/angular2/bundles/angular2-polyfills.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/rxjs/bundles/Rx.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/angular2.dev.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/http.dev.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/router.dev.js"&gt;&lt;/script&gt;
  &lt;script src="public/js/bundle.js"&gt;&lt;/script&gt;
  
  &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt;
  &lt;link href="css/local.css" rel="stylesheet"&gt;
  
  &lt;script&gt;
      System.config({
      packages: {        
        app: {
          format: 'register',
          defaultExtension: 'js'
        }
      }
    });
    System.import('main')
          .then(null, console.error.bind(console));
  &lt;/script&gt;
  
  &lt;script src="node_modules/ng2-bs3-modal/bundles/ng2-bs3-modal.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;base href="/"&gt;
  &lt;body&gt;
  &lt;app&gt;Loading...&lt;/app&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>browse-component.ts</p>
  
  <pre><code>import {Component, ViewChild} from 'angular2/core';
  import {Injectable} from 'angular2/core';
  import {RecipientListComponent} from './recipient-list.component';
  import {RecipientService} from './recipient.service';
  import {RouteParams, ROUTER_DIRECTIVES} from 'angular2/router';
  import { MODAL_DIRECTIVES, ModalComponent } from 'ng2-bs3-modal/ng2-bs3-modal';
  </code></pre>
  
  <p>If I remove the ng2-bs3-modal import from the component, everything runs normally as before</p>
  
  <p>All the demos and examples have the index.html file with the js file being loaded via the system.config, so I'm wondering was this ever tested with the script tag loading as mentioned in the instructions.</p>