I have angular app that is based on routing, what I want is to bundle it into WebView application as html file so it will be accessible by ~/app_path/index.html
I successfully built it with ng build --prod --output-path ./../ng-build and it loads fine in browser.
The problem is if I use router module I will get Unhandled Navigation Error warning and routes just don't work.
I tried to use hashes with useHash
imports: [RouterModule.forRoot(routes, {useHash: true})],
and expected it might work with routes e.g.
`~/app_path/index.html#settings`
`~/app_path/index.html#profile`
`~/app_path/index.html#details`
but it doesn't help - router crashes immediately after app launch
Is there any solution or workaround to achieve routing in this file:// mode? Or maybe another architecture approach to use in the app here instead of routing.


useHashshould be paired with absolute filesystem path that can be taken from location as per this comment github.com/angular/angular/issues/13948#issuecomment-302727428