I'm using jquery datatable in my angular 6 application. If I use the table in home page the table loads perfectly. But if I try to use the same table in different component and try to route to that page the view initiates for few sec and then it automatically redirected to home page. If I hide the table on that component the routing works perfectly. I don't see any error or warning in my console. so I couldn't able to find what is the source of the problem. someone kindly help me out.
home-page.component.html
<p>
home-page works!
</p>
<div [routerLink]="['/transactions']">Table</div>
app-routing.module.ts
import { Routes, RouterModule } from '@angular/router';
import { TransactionsComponent } from './transactions/transactions.component';
import { HomePageComponent } from './home-page/home-page.component';
const routes: Routes = [
{ path: 'transactions', component: TransactionsComponent },
{ path: '', component: HomePageComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
stackblitz url Issue I'm Facing