How to have custom URL and remove .html extension without Wordpress?

View other answers to this thread
Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

davElsanto's photo

You can use angular route(ngRoute). So all your links has a route to the file you want.

Example: Using ionic 1

.state('app.tabs.myorders', {
        url: '/myorders',
        views: {
            'tab-myorders': {
                templateUrl: 'templates/myorders.html'
            }
        }
    })

.state('myorder', {
    url: '/myorders/:myorderId',
    templateUrl: 'templates/myorder.html',
    })

And when you access to "/myorders" you get all into the template(all the orders), in this case it's "templates/myorders.html". In these template(myorders.html) there are links to any order like this "href="/myorders/56", where "56 is :myorderId"(order id). So, if you clicked on any link, it access to the state myorder.

  • Sorry for my english :)

More info: https://docs.angularjs.org/api/ngRoute#!