I try to implement router lazy loading in angular 2, so that I can do something like
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full',
{ path: 'about', loadChildren: './+about/about.module#AboutModule' }
];
It requires set up like
webpack.config.js
loaders: [
{
test: /\.ts$/,
loaders: [
‘awesome-typescript-loader’,
‘angular2-template-loader’,
‘angular2-router-loader’]
},
...
]
The problem is I am using Visual Studio 2015 ASP.NET Core Template Pack, which got completely different contents in webpack.config.js. How can I set up to make the lazy loading working?
Should I be using ASP.NET Core Template Pack in the long run for developing angular 2 applications? I am not sure whether ASP.NET Core Template Pack is the right path for me. Thanks