I am using Gulp Angular2 with route
@RouteConfig([{path:'/contacts', name:'Contacts', component:ContactListComponent, useAsDefault: true }, {path:'/newcontact', name: 'NewContact', component:NewContactComponent}])
Included base <base href="/">
in HTML.
Below is my gulpfile details
gulp.task('serve', function(){
gulp.watch([config.allTs],['ts-lint','compile-ts']);
browserSync({
port: 3000,
files: ['index.html','**/*.js'],
injectChanges: true,
logFileChanges: false,
logLevel: 'silent',
notify: true,
reloadDelay: 0,
server:{
baseDir: ['./'],
middleware: superstatic({ debug: false })
}
});
});
While reloading the page after any change in the ts files, I am getting "Cannot GET /contacts". How to resolve this issue in angular2?