DevWurm / angular-electron-seed

Seed project for an Angular - Electron Desktop app with the Angular-CLI
28 stars 21 forks source link

Cannot Get /list path #9

Closed sekar-worx closed 7 years ago

sekar-worx commented 7 years ago

Hey,

I am facing an issue while using route. Once i refresh the page manually in electron it shows error like Cannot GET /list path please help me in this.

DevWurm commented 7 years ago

As mentioned in this thread, you might try to realize the routing via url fragment identifiers instead of subroutes, when using Electron. Using subroutes may lead Electron to load a "file" which doesn't exist and as far as I know, there is no Electron option to re-route this misleading requests.

So you might import your routing module with this option:

RouterModule.forRoot(routes,{useHash:true})

Please let us know, if it worked!

sekar-worx commented 7 years ago

Thanks, it fixed now