title: How can use external js files into angular.json in angular 6
body: <p>I have a side bar menu script file, in assets folder that I include into <code>index.html</code>. Whenever I refresh the <code>home/dashboard</code> child route the script will be working, If I'm redirected from the initial route <code>/</code> to <code>home/dashboard</code> the sidebar show/hidden button doesn't work (this logic is part of the script I mentioned) Once I refresh the page, the external scripts will work properly. Here is my routing module</p>
  
  <pre><code> app.routing.module.ts
  
   const routes: Routes = [
        { path: '', redirectTo: '/home', pathMatch: 'full' },
        //{ path: 'login', component: LoginComponent,  },
        { path: 'home', component: HomeComponent,
        children:[
          { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
          { path: 'dashboard', component: DashboardComponent,},
          { path: 'totalapproved', component: ApprovedComponent,},
          { path: 'campaign', component: CampaignmanagerComponent,},]}
      ]
  </code></pre>
  
  <p>Is there any way to add external assets script to angular.json file?</p>