I'm trying to get Angular 6 and Joomla to work together. It's been working well with the angular app inside a module. But now we have a requirement to change the Angular hashrouting system to regular routing.
Example:
The old url:
http://domain.com/tire#/regnr?regnr=abc123&type=rim
The new url need to be:
http://domain.com/tire/regnr?regnr=abc123&type=rim
Currently Joomla doesn't care about what comes after the hash sign. When changing the angular setting for hashrouting, Joomla gives error 404, page not found, since it's trying to look up the regnr directory/file.
I've tried poking around in the .htaccess file but there doesn't seem to exist a solution which resonates well with Joomla. I need some way to tell Joomla to ignore everything that comes after /tire/.. simliar to how you would do in Node.js:
Code: Select all
// Handle Angular routing, return all requests to Angular app
app.get('*', function(req, res) {
res.sendFile(path.join(__dirname, 'client/build', 'index.html'));
});