title: How to load different views with different jquery plugins/libraries rendered on it in angular2 by using routers?
body: <p>static view are easy to render in routing in angular2.But how to show dynamic views by rendering jquery plugins or libraries on them?</p>
  
  <p>app.routing.ts:</p>
  
  <pre><code>    import { ModuleWithProviders } from '@angular/core';
      import { Routes, RouterModule } from '@angular/router';
      import { AppComponent } from './app.component';
      import { OwnComponent } from './own.component';
      import { Own1Component } from './own1.component';
      import { Own2Component } from './own2.component';
      const appRoutes: Routes = [
         { path: 'own1', component: Own1Component },
        { path: 'own2', component: Own2Component },
  
        { path: '', component: OwnComponent },
        { path: '**', component: AppComponent }
      ];
  
      export const appRoutingProviders: any[] = [
  
      ];
  
      export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
  </code></pre>
  
  <p>own.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    template: '&lt;h1&gt;From own on default&lt;/h1&gt;'
  })
  export class OwnComponent { }
  </code></pre>
  
  <p>own1.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  @Component({
    templateUrl: 'flot.html',
  })
  export class Own1Component {}
  </code></pre>
  
  <p>own2.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
   templateUrl: 'morris.html',
  })
  export class Own2Component { }
  </code></pre>
  
  <p>app.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
    selector: 'my-app',
    templateUrl: 'app/app.component.html',
  })
  export class AppComponent { }
  </code></pre>
  
  <p>Now,here,morris.html and flot.html requires jquery plugins to load their stuff. so,i've tried all stuff like:
  including jquery libraries in flot.html,morris.html,index.html,app.component.html</p>
  
  <p>But none of them worked.
  And,putting angular2 removes script tag from morris.html and flot.html i don't know why.
  so i am confused.and i want them to load specific js for specific routes.</p>