Redirect /tx to /#/tx

This commit is contained in:
Micah Riggan 2018-04-11 16:23:29 -04:00
parent 30852fd11c
commit 18df6d7878
No known key found for this signature in database
GPG Key ID: 1DF0722D8116EE83
2 changed files with 9 additions and 7 deletions

View File

@ -19,7 +19,7 @@ import { BlocksProvider } from '../providers/blocks/blocks';
BrowserModule,
HttpModule,
PagesModule,
IonicModule.forRoot(InsightApp)
IonicModule.forRoot(InsightApp, {locationStrategy: 'path'})
],
bootstrap: [IonicApp],
entryComponents: [

View File

@ -45,13 +45,15 @@ InsightUI.prototype.getRoutePrefix = function() {
InsightUI.prototype.setupRoutes = function(app, express) {
var self = this;
app.use(express.static(__dirname + '/../app/www'));
// if not in found, fall back to indexFile (404 is handled client-side)
/*
app.use(function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.send(self.indexFile);
app.use((req, resp, next) => {
const url = req.originalUrl;
if (!url.includes("#") && !url.includes(".")) {
const redirectTo = `/#${url}`;
resp.redirect(redirectTo);
} else {
next();
}
});
*/
};
InsightUI.prototype.filterIndexHTML = function(data) {