How to load same page on refresh in angularjs?

i have an application written in nodejs and angularjs . In index page bottom of there is an hyperlink text.when i click on that hyper link page is loading but when i refresh same page it give 404 error .

When you refresh the page, you are telling the http server to handle a GET request for some resource that matches the hyperlink address.

Assume this address is path/to/resource.

When the server receives that request, it looks for a static resource or a handler that matches that path. If it does not find one, it returns a 404.

Assuming that the hyperlinked resource is something withing your angular app, you need to server the index.html page again regardless of what is requested. This will allow the angular app to bootstrap, parse the route, and go through its own routing to reload that page.

If you're using Express then this code would do the trick:

var app = require('express');
app.use('*', function (req, res, next) {
    res.sendfile('index.html');
    return next();
});

Now every request will return index file and Angular will do the rest.